summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorNaveed Massjouni <naveedm9@gmail.com>2011-05-28 04:29:35 -0400
committerNaveed Massjouni <naveedm9@gmail.com>2011-05-28 04:29:35 -0400
commit1fced8f7a527f25abde457cfcf056a9a082a79c3 (patch)
tree9bcbae61c53869096dc015d6f08254c0bb792ba4 /nova/tests
parente75bbc348c713775af11293fc6e5e05667279234 (diff)
Fixing integration tests by correctly stubbing image service.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/integrated/integrated_helpers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/tests/integrated/integrated_helpers.py b/nova/tests/integrated/integrated_helpers.py
index 3b4c49c93..5eacc829d 100644
--- a/nova/tests/integrated/integrated_helpers.py
+++ b/nova/tests/integrated/integrated_helpers.py
@@ -152,10 +152,10 @@ class _IntegratedTestBase(test.TestCase):
f = self._get_flags()
self.flags(**f)
- def fake_image_service(*args):
- return nova.image.fake.FakeImageService()
- self.stubs.Set(
- nova.image.glance, 'GlanceImageService', fake_image_service)
+ def fake_get_image_service(image_href):
+ image_id = int(str(image_href).split('/')[-1])
+ return (nova.image.fake.FakeImageService(), image_id)
+ self.stubs.Set(nova.image, 'get_image_service', fake_get_image_service)
# set up services
self.start_service('compute')