summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-07 09:30:44 +0000
committerGerrit Code Review <review@openstack.org>2012-09-07 09:30:44 +0000
commit37cc45b8fdaa199b248a7ef5f683d514733b8387 (patch)
treef7faf89cb8a663bac14b81ceb1fed383acdd0eaa /nova
parentd7e2b2ee09ff590fc930f2aafeec1e9338f57f52 (diff)
parent4c9ae2c2e9312d1ce6ca1927a4988f22d61853a5 (diff)
downloadnova-37cc45b8fdaa199b248a7ef5f683d514733b8387.tar.gz
nova-37cc45b8fdaa199b248a7ef5f683d514733b8387.tar.xz
nova-37cc45b8fdaa199b248a7ef5f683d514733b8387.zip
Merge "Simplify setting up test notifier"
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/compute/test_compute.py2
-rw-r--r--nova/tests/compute/test_compute_utils.py2
-rw-r--r--nova/tests/test_notifications.py2
-rw-r--r--nova/tests/test_volume.py5
-rw-r--r--nova/tests/test_volume_utils.py5
5 files changed, 7 insertions, 9 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index e96f525c9..4d3b0889d 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -86,7 +86,7 @@ class BaseTestCase(test.TestCase):
def setUp(self):
super(BaseTestCase, self).setUp()
self.flags(compute_driver='nova.virt.fake.FakeDriver',
- notification_driver=['nova.openstack.common.notifier.test_notifier'],
+ notification_driver=[test_notifier.__name__],
network_manager='nova.network.manager.FlatManager')
self.compute = importutils.import_object(FLAGS.compute_manager)
diff --git a/nova/tests/compute/test_compute_utils.py b/nova/tests/compute/test_compute_utils.py
index 6634bead7..5ac874bae 100644
--- a/nova/tests/compute/test_compute_utils.py
+++ b/nova/tests/compute/test_compute_utils.py
@@ -166,7 +166,7 @@ class UsageInfoTestCase(test.TestCase):
fake_get_nw_info)
self.flags(compute_driver='nova.virt.fake.FakeDriver',
- notification_driver=['nova.openstack.common.notifier.test_notifier'],
+ notification_driver=[test_notifier.__name__],
network_manager='nova.network.manager.FlatManager')
self.compute = importutils.import_object(FLAGS.compute_manager)
self.user_id = 'fake'
diff --git a/nova/tests/test_notifications.py b/nova/tests/test_notifications.py
index 8f41f181e..94922941e 100644
--- a/nova/tests/test_notifications.py
+++ b/nova/tests/test_notifications.py
@@ -54,7 +54,7 @@ class NotificationsTestCase(test.TestCase):
fake_network.set_stub_network_methods(self.stubs)
self.flags(compute_driver='nova.virt.fake.FakeDriver',
- notification_driver=['nova.openstack.common.notifier.test_notifier'],
+ notification_driver=[test_notifier.__name__],
network_manager='nova.network.manager.FlatManager',
notify_on_state_change="vm_and_task_state",
host='testhost')
diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
index 44735bf7c..a147a3a99 100644
--- a/nova/tests/test_volume.py
+++ b/nova/tests/test_volume.py
@@ -51,9 +51,8 @@ class VolumeTestCase(test.TestCase):
self.compute = importutils.import_object(FLAGS.compute_manager)
vol_tmpdir = tempfile.mkdtemp()
self.flags(compute_driver='nova.virt.fake.FakeDriver',
- volumes_dir=vol_tmpdir)
- self.stubs.Set(nova.flags.FLAGS, 'notification_driver',
- ['nova.openstack.common.notifier.test_notifier'])
+ volumes_dir=vol_tmpdir,
+ notification_driver=[test_notifier.__name__])
self.stubs.Set(iscsi.TgtAdm, '_get_target', self.fake_get_target)
self.volume = importutils.import_object(FLAGS.volume_manager)
self.context = context.get_admin_context()
diff --git a/nova/tests/test_volume_utils.py b/nova/tests/test_volume_utils.py
index 66b00d48f..89ad7c3db 100644
--- a/nova/tests/test_volume_utils.py
+++ b/nova/tests/test_volume_utils.py
@@ -38,9 +38,8 @@ class UsageInfoTestCase(test.TestCase):
def setUp(self):
super(UsageInfoTestCase, self).setUp()
self.flags(compute_driver='nova.virt.fake.FakeDriver',
- host='fake')
- self.stubs.Set(flags.FLAGS, 'notification_driver',
- ['nova.openstack.common.notifier.test_notifier'])
+ host='fake',
+ notification_driver=[test_notifier.__name__])
fake_network.set_stub_network_methods(self.stubs)
self.volume = importutils.import_object(FLAGS.volume_manager)