~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/test_common.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-08-16 14:04:11 UTC
  • mto: This revision was merged to the branch mainline in revision 84.
  • Revision ID: package-import@ubuntu.com-20120816140411-0mr4n241wmk30t9l
Tags: upstream-2012.2~f3
ImportĀ upstreamĀ versionĀ 2012.2~f3

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        expected = 'abc123'
284
284
        self.assertEqual(actual, expected)
285
285
 
286
 
    def test_get_version_from_href(self):
287
 
        fixture = 'http://www.testsite.com/v1.1/images'
288
 
        expected = '1.1'
289
 
        actual = common.get_version_from_href(fixture)
290
 
        self.assertEqual(actual, expected)
291
 
 
292
 
    def test_get_version_from_href_2(self):
293
 
        fixture = 'http://www.testsite.com/v1.1'
294
 
        expected = '1.1'
295
 
        actual = common.get_version_from_href(fixture)
296
 
        self.assertEqual(actual, expected)
297
 
 
298
 
    def test_get_version_from_href_default(self):
299
 
        fixture = 'http://www.testsite.com/images'
300
 
        expected = '2'
301
 
        actual = common.get_version_from_href(fixture)
302
 
        self.assertEqual(actual, expected)
303
 
 
304
286
    def test_raise_http_conflict_for_instance_invalid_state(self):
305
287
        # Correct args
306
288
        exc = exception.InstanceInvalidState(attr='fake_attr',