diff options
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/fakes.py | 15 | ||||
| -rw-r--r-- | nova/tests/api/openstack/test_images.py | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index 1d4cddffc..58022bfde 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -29,6 +29,7 @@ from nova import flags from nova import exception as exc import nova.api.openstack.auth from nova.image import service +from nova.image.services import glance from nova.wsgi import Router @@ -154,19 +155,19 @@ def stub_out_glance(stubs, initial_fixtures=[]): self.fixtures = [] fake_parallax_client = FakeParallaxClient(initial_fixtures) - stubs.Set(nova.image.service.ParallaxClient, 'get_image_index', + stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_index', fake_parallax_client.fake_get_image_index) - stubs.Set(nova.image.service.ParallaxClient, 'get_image_details', + stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_details', fake_parallax_client.fake_get_image_details) - stubs.Set(nova.image.service.ParallaxClient, 'get_image_metadata', + stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_metadata', fake_parallax_client.fake_get_image_metadata) - stubs.Set(nova.image.service.ParallaxClient, 'add_image_metadata', + stubs.Set(nova.image.services.glance.ParallaxClient, 'add_image_metadata', fake_parallax_client.fake_add_image_metadata) - stubs.Set(nova.image.service.ParallaxClient, 'update_image_metadata', + stubs.Set(nova.image.services.glance.ParallaxClient, 'update_image_metadata', fake_parallax_client.fake_update_image_metadata) - stubs.Set(nova.image.service.ParallaxClient, 'delete_image_metadata', + stubs.Set(nova.image.services.glance.ParallaxClient, 'delete_image_metadata', fake_parallax_client.fake_delete_image_metadata) - stubs.Set(nova.image.service.GlanceImageService, 'delete_all', + stubs.Set(nova.image.services.glance.GlanceImageService, 'delete_all', fake_parallax_client.fake_delete_all) diff --git a/nova/tests/api/openstack/test_images.py b/nova/tests/api/openstack/test_images.py index 4cbc01841..b6bc65b84 100644 --- a/nova/tests/api/openstack/test_images.py +++ b/nova/tests/api/openstack/test_images.py @@ -150,7 +150,7 @@ class GlanceImageServiceTest(unittest.TestCase, def setUp(self): self.stubs = stubout.StubOutForTesting() fakes.stub_out_glance(self.stubs) - self.service = utils.import_object('nova.image.service.GlanceImageService') + self.service = utils.import_object('nova.image.services.glance.GlanceImageService') self.service.delete_all() def tearDown(self): @@ -188,7 +188,7 @@ class ImageControllerWithGlanceServiceTest(unittest.TestCase): def setUp(self): self.orig_image_service = FLAGS.image_service - FLAGS.image_service = 'nova.image.service.GlanceImageService' + FLAGS.image_service = 'nova.image.services.glance.GlanceImageService' self.stubs = stubout.StubOutForTesting() fakes.FakeAuthManager.auth_data = {} fakes.FakeAuthDatabase.data = {} |
