diff options
Diffstat (limited to 'tests/unit/test_plugin.py')
| -rw-r--r-- | tests/unit/test_plugin.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 31f2e7a..b68d6f5 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -17,9 +17,7 @@ import pkg_resources import unittest from openstack.common import cfg -from openstack.common import notifier from openstack.common.notifier import api as notifier_api -from openstack.common.notifier import no_op_notifier from openstack.common.plugin import plugin from openstack.common.plugin import pluginmanager from tests import utils as test_utils @@ -34,12 +32,6 @@ class SimpleNotifier(object): self.message_list.append(message) -class SimplerNotifier(object): - def notify(self, context, message): - global simpler_notify_called - simpler_notify_called = True - - class ManagerTestCase(test_utils.BaseTestCase): def tearDown(self): super(ManagerTestCase, self).tearDown() @@ -54,15 +46,9 @@ class NotifyTestCase(test_utils.BaseTestCase): def setUp(self): super(NotifyTestCase, self).setUp() - # Set up a 'normal' notifier to make sure the plugin logic - # doesn't mess anything up. - self.stubs.Set(cfg.CONF, 'notification_driver', - SimplerNotifier()) - global simpler_notify_called - simpler_notify_called = False - def tearDown(self): super(NotifyTestCase, self).tearDown() + notifier_api._reset_drivers() def test_add_notifier(self): notifier1 = SimpleNotifier() @@ -95,11 +81,6 @@ class NotifyTestCase(test_utils.BaseTestCase): self.assertEqual(len(notifier.message_list), 1) - # Verify that the original baseline notifier is still - # installed and working. - global simpler_notify_called - self.assertTrue(simpler_notify_called) - class StubControllerExtension(object): name = 'stubextension' |
