summaryrefslogtreecommitdiff
path: root/tests/unittests/test_reporting.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-08-07 16:06:36 -0500
committerScott Moser <smoser@ubuntu.com>2015-08-07 16:06:36 -0500
commitb39070772aba62d68fea14603b8d657bbb529d5e (patch)
tree87d20d1fb8c047cbe16ed1ec1dfb88c5c3f02999 /tests/unittests/test_reporting.py
parent9975e06338bb646dbefe0749f7a8f88974d44d24 (diff)
downloadvyos-cloud-init-b39070772aba62d68fea14603b8d657bbb529d5e.tar.gz
vyos-cloud-init-b39070772aba62d68fea14603b8d657bbb529d5e.zip
reporting: fix logging reproter and tests
Diffstat (limited to 'tests/unittests/test_reporting.py')
-rw-r--r--tests/unittests/test_reporting.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unittests/test_reporting.py b/tests/unittests/test_reporting.py
index 1a4ee8c4..66d4e87e 100644
--- a/tests/unittests/test_reporting.py
+++ b/tests/unittests/test_reporting.py
@@ -137,14 +137,14 @@ class TestLogHandler(TestCase):
def test_single_log_message_at_info_published(self, getLogger):
event = reporting.ReportingEvent('type', 'name', 'description')
reporting.handlers.LogHandler().publish_event(event)
- self.assertEqual(1, getLogger.return_value.info.call_count)
+ self.assertEqual(1, getLogger.return_value.log.call_count)
@mock.patch.object(reporting.handlers.logging, 'getLogger')
def test_log_message_uses_event_as_string(self, getLogger):
event = reporting.ReportingEvent('type', 'name', 'description')
- reporting.handlers.LogHandler().publish_event(event)
+ reporting.handlers.LogHandler(level="INFO").publish_event(event)
self.assertIn(event.as_string(),
- getLogger.return_value.info.call_args[0][0])
+ getLogger.return_value.log.call_args[0][1])
class TestDefaultRegisteredHandler(TestCase):