Fix logging notifier unit test
For unknown reasons, the `create_notifier()` in `test_api_request_no_messaging()` used `oslo_messaging.Notifier` instead of the `_LogNotifier` that should be originally used, causing unit test to fail. This patch fixes this issue by changing `use_oslo_messaging` config to False for this test. Change-Id: I32f9dc596525e912e37984764f68564e26ecfd3b
This commit is contained in:
parent
2bda844bb2
commit
9c49da6887
@ -27,6 +27,8 @@ class TestLoggingNotifier(base.BaseAuditMiddlewareTest):
|
|||||||
super(TestLoggingNotifier, self).setUp()
|
super(TestLoggingNotifier, self).setUp()
|
||||||
|
|
||||||
def test_api_request_no_messaging(self):
|
def test_api_request_no_messaging(self):
|
||||||
|
self.cfg.config(use_oslo_messaging=False,
|
||||||
|
group='audit_middleware_notifications')
|
||||||
app = self.create_simple_app()
|
app = self.create_simple_app()
|
||||||
|
|
||||||
with mock.patch('keystonemiddleware.audit._LOG.info') as log:
|
with mock.patch('keystonemiddleware.audit._LOG.info') as log:
|
||||||
|
Loading…
Reference in New Issue
Block a user