diff options
Diffstat (limited to 'oslo_log/tests/unit/test_log.py')
-rw-r--r-- | oslo_log/tests/unit/test_log.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/oslo_log/tests/unit/test_log.py b/oslo_log/tests/unit/test_log.py index 76f614a..9ff58cf 100644 --- a/oslo_log/tests/unit/test_log.py +++ b/oslo_log/tests/unit/test_log.py @@ -403,6 +403,7 @@ class OSJournalHandlerTestCase(BaseTestCase): mock.call(mock.ANY, CODE_FILE=mock.ANY, CODE_FUNC='test_emit', CODE_LINE=mock.ANY, LOGGER_LEVEL='INFO', LOGGER_NAME='nova-test.foo', PRIORITY=6, + SYSLOG_FACILITY=syslog.LOG_USER, SYSLOG_IDENTIFIER=mock.ANY, REQUEST_ID=mock.ANY, PROJECT_NAME='mytenant', @@ -415,7 +416,8 @@ class OSJournalHandlerTestCase(BaseTestCase): self.assertIsInstance(args[0], six.string_types) self.assertIsInstance(kwargs['CODE_LINE'], int) self.assertIsInstance(kwargs['PRIORITY'], int) - del kwargs['CODE_LINE'], kwargs['PRIORITY'] + self.assertIsInstance(kwargs['SYSLOG_FACILITY'], int) + del kwargs['CODE_LINE'], kwargs['PRIORITY'], kwargs['SYSLOG_FACILITY'] for key, arg in kwargs.items(): self.assertIsInstance(key, six.string_types) self.assertIsInstance(arg, six.string_types + (six.binary_type,)) @@ -432,6 +434,7 @@ class OSJournalHandlerTestCase(BaseTestCase): CODE_FUNC='test_emit_exception', CODE_LINE=mock.ANY, LOGGER_LEVEL='ERROR', LOGGER_NAME='nova-exception.foo', PRIORITY=3, + SYSLOG_FACILITY=syslog.LOG_USER, SYSLOG_IDENTIFIER=mock.ANY, REQUEST_ID=mock.ANY, EXCEPTION_INFO=mock.ANY, @@ -446,7 +449,8 @@ class OSJournalHandlerTestCase(BaseTestCase): self.assertIsInstance(args[0], six.string_types) self.assertIsInstance(kwargs['CODE_LINE'], int) self.assertIsInstance(kwargs['PRIORITY'], int) - del kwargs['CODE_LINE'], kwargs['PRIORITY'] + self.assertIsInstance(kwargs['SYSLOG_FACILITY'], int) + del kwargs['CODE_LINE'], kwargs['PRIORITY'], kwargs['SYSLOG_FACILITY'] for key, arg in kwargs.items(): self.assertIsInstance(key, six.string_types) self.assertIsInstance(arg, six.string_types + (six.binary_type,)) |