From 18a98bf5cfc9837651057474aea12aa524786806 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Tue, 24 Oct 2023 21:39:01 -0500 Subject: [PATCH] logger: add tests --- automon/log/tests/test_logger_builtin.py | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 automon/log/tests/test_logger_builtin.py diff --git a/automon/log/tests/test_logger_builtin.py b/automon/log/tests/test_logger_builtin.py new file mode 100644 index 00000000..29e2d511 --- /dev/null +++ b/automon/log/tests/test_logger_builtin.py @@ -0,0 +1,31 @@ +import unittest + +from automon.log import logger + +log = logger.logging.getLogger(__name__) +log.setLevel(logger.DEBUG) + + +class LoggingTest(unittest.TestCase): + + def test_logger(self): + self.assertTrue(log) + + def test_error(self): + self.assertIsNone(log.error('test')) + + def test_debug(self): + self.assertIsNone(log.debug('test')) + + def test_info(self): + self.assertIsNone(log.info('test')) + + def test_critical(self): + self.assertIsNone(log.critical('test')) + + def test_warn(self): + self.assertIsNone(log.warning('test')) + + +if __name__ == '__main__': + unittest.main()