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:
Ayumu Ueha 2022-08-09 14:07:21 +00:00
parent 2bda844bb2
commit 9c49da6887
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ class TestLoggingNotifier(base.BaseAuditMiddlewareTest):
super(TestLoggingNotifier, self).setUp()
def test_api_request_no_messaging(self):
self.cfg.config(use_oslo_messaging=False,
group='audit_middleware_notifications')
app = self.create_simple_app()
with mock.patch('keystonemiddleware.audit._LOG.info') as log: