diff options
author | Andrew Bogott <abogott@wikimedia.org> | 2012-07-19 03:34:31 -0500 |
---|---|---|
committer | Andrew Bogott <abogott@wikimedia.org> | 2012-08-02 18:11:37 -0500 |
commit | c767e9beffe4b826eac869ce7e2eef2cc1499bbe (patch) | |
tree | 71e7bb4e8495db8e924ab355483781df32a6190e /tests/unit/test_log.py | |
parent | bcb424dd730a977aeaae9f6e33e9bb35cbc0c062 (diff) | |
download | oslo-c767e9beffe4b826eac869ce7e2eef2cc1499bbe.tar.gz oslo-c767e9beffe4b826eac869ce7e2eef2cc1499bbe.tar.xz oslo-c767e9beffe4b826eac869ce7e2eef2cc1499bbe.zip |
Add multiple-driver support to the notifier api.
Move all of the functionality previously provided by the list_notifier
into the basic notifier api. Move and restructure tests accordingly.
Remove the list_notifier file and test file.
For bug 1025820
Change-Id: Idf7cb975dd78e9951188781622a4d10ca466b154
Diffstat (limited to 'tests/unit/test_log.py')
-rw-r--r-- | tests/unit/test_log.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/unit/test_log.py b/tests/unit/test_log.py index 35ff72d..f0aab28 100644 --- a/tests/unit/test_log.py +++ b/tests/unit/test_log.py @@ -10,7 +10,6 @@ from openstack.common import cfg from openstack.common import jsonutils from openstack.common import log from openstack.common.notifier import api as notifier -from openstack.common.notifier import list_notifier from tests import utils as test_utils CONF = cfg.CONF @@ -86,20 +85,8 @@ class PublishErrorsHandlerTestCase(test_utils.BaseTestCase): super(PublishErrorsHandlerTestCase, self).setUp() self.publiserrorshandler = log.PublishErrorsHandler(logging.ERROR) - def test_emit_cfg_list_notifier_drivers_in_flags(self): - self.stub_flg = False - - def fake_notifier(*args, **kwargs): - self.stub_flg = True - - self.stubs.Set(notifier, 'notify', fake_notifier) - logrecord = logging.LogRecord('name', 'WARN', '/tmp', 1, - 'Message', None, None) - self.publiserrorshandler.emit(logrecord) - self.assertTrue(self.stub_flg) - - def test_emit_cfg_log_notifier_in_list_notifier_drivers(self): - self.config(list_notifier_drivers=[ + def test_emit_cfg_log_notifier_in_notifier_drivers(self): + self.config(notification_driver=[ 'openstack.common.notifier.rabbit_notifier', 'openstack.common.notifier.log_notifier']) self.stub_flg = True |