From a60fc5b59a5f7fcf87ee466c46c86e7814ade2df Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 9 May 2013 12:07:22 +1000 Subject: [PATCH] Fix the nova notifier tests after a nova rename https://github.com/openstack/nova/commit/3222d8bb021effb3156ed86e263cdc0ac64fd44a fixes bug 1178055 Change-Id: I49f530a73c70a3efbec000e5de493b0d82ad3435 --- nova_tests/test_notifier.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nova_tests/test_notifier.py b/nova_tests/test_notifier.py index 118d540db..9666b41dc 100644 --- a/nova_tests/test_notifier.py +++ b/nova_tests/test_notifier.py @@ -32,7 +32,11 @@ from stevedore.tests import manager as test_manager ## works. Please don't change them. from nova.tests import fake_network from nova.compute import vm_states -from nova.compute import instance_types +try: + from nova.compute import flavors +except ImportError: + from nova.compute import instance_types as flavors + from nova import config from nova import context from nova import db @@ -128,7 +132,7 @@ class TestNovaNotifier(base.TestCase): self.stubs.Set(db, 'instance_update_and_get_original', lambda context, uuid, kwargs: (self.instance, self.instance)) - self.stubs.Set(instance_types, 'extract_instance_type', + self.stubs.Set(flavors, 'extract_instance_type', lambda ref: {}) # Set up to capture the notification messages generated by the