]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fake requests in tests should be to v1
authorMike Perez <thingee@gmail.com>
Sun, 12 Aug 2012 23:20:53 +0000 (16:20 -0700)
committerMike Perez <thingee@gmail.com>
Sun, 12 Aug 2012 23:26:23 +0000 (16:26 -0700)
v2 does not exist, yet.

Change-Id: Id3a332c4d78c87882a7db1a8b98479a3881b0a5f

cinder/tests/api/openstack/volume/test_snapshots.py
cinder/tests/api/openstack/volume/test_types.py
cinder/tests/api/openstack/volume/test_volumes.py

index b224c4819ce20a4c8f39d6c828a048a4b980b33c..b146271f75215c3e67bbe91c2fc9a638246a4e55 100644 (file)
@@ -174,20 +174,20 @@ class SnapshotApiTest(test.TestCase):
         self.assertEqual(1, len(res['snapshots']))
 
     def test_admin_list_snapshots_all_tenants(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/snapshots?all_tenants=1',
+        req = fakes.HTTPRequest.blank('/v1/fake/snapshots?all_tenants=1',
                                       use_admin_context=True)
         res = self.controller.index(req)
         self.assertTrue('snapshots' in res)
         self.assertEqual(3, len(res['snapshots']))
 
     def test_all_tenants_non_admin_gets_all_tenants(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/snapshots?all_tenants=1')
+        req = fakes.HTTPRequest.blank('/v1/fake/snapshots?all_tenants=1')
         res = self.controller.index(req)
         self.assertTrue('snapshots' in res)
         self.assertEqual(1, len(res['snapshots']))
 
     def test_non_admin_get_by_project(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/snapshots')
+        req = fakes.HTTPRequest.blank('/v1/fake/snapshots')
         res = self.controller.index(req)
         self.assertTrue('snapshots' in res)
         self.assertEqual(1, len(res['snapshots']))
index 72a2449daa16a389c1fcb282616d7b4e46d221ea..2ad26de2e0f53d136713ea02a3075aa0e7117eb2 100644 (file)
@@ -117,7 +117,7 @@ class VolumeTypesApiTest(test.TestCase):
                                deleted_at=None,
                                id=42)
 
-        request = fakes.HTTPRequest.blank("/v2")
+        request = fakes.HTTPRequest.blank("/v1")
         output = view_builder.show(request, raw_volume_type)
 
         self.assertTrue('volume_type' in output)
@@ -140,7 +140,7 @@ class VolumeTypesApiTest(test.TestCase):
                                          deleted_at=None,
                                          id=42 + i))
 
-        request = fakes.HTTPRequest.blank("/v2")
+        request = fakes.HTTPRequest.blank("/v1")
         output = view_builder.index(request, raw_volume_types)
 
         self.assertTrue('volume_types' in output)
index 902ae72828170aaa0c0f5c96a7bc7f451eddcbfa..50c3f662a2640bb1b7b5ebd0e99638605b8d1a21 100644 (file)
@@ -206,7 +206,7 @@ class VolumeApiTest(test.TestCase):
                           1)
 
     def test_admin_list_volumes_limited_to_project(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/volumes',
+        req = fakes.HTTPRequest.blank('/v1/fake/volumes',
                                       use_admin_context=True)
         res = self.controller.index(req)
 
@@ -214,20 +214,20 @@ class VolumeApiTest(test.TestCase):
         self.assertEqual(1, len(res['volumes']))
 
     def test_admin_list_volumes_all_tenants(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/volumes?all_tenants=1',
+        req = fakes.HTTPRequest.blank('/v1/fake/volumes?all_tenants=1',
                                       use_admin_context=True)
         res = self.controller.index(req)
         self.assertTrue('volumes' in res)
         self.assertEqual(3, len(res['volumes']))
 
     def test_all_tenants_non_admin_gets_all_tenants(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/volumes?all_tenants=1')
+        req = fakes.HTTPRequest.blank('/v1/fake/volumes?all_tenants=1')
         res = self.controller.index(req)
         self.assertTrue('volumes' in res)
         self.assertEqual(1, len(res['volumes']))
 
     def test_non_admin_get_by_project(self):
-        req = fakes.HTTPRequest.blank('/v2/fake/volumes')
+        req = fakes.HTTPRequest.blank('/v1/fake/volumes')
         res = self.controller.index(req)
         self.assertTrue('volumes' in res)
         self.assertEqual(1, len(res['volumes']))