We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7f216b commit 99827e4Copy full SHA for 99827e4
tests/unittests/util_test.py
@@ -0,0 +1,17 @@
1
+import logging
2
+
3
+import pytest
4
5
+from nav.util import check_log_level
6
7
8
+class TestCheckLogLevel:
9
+ def test_actual_loglevel_above_input_should_return_false(self, *_):
10
+ logger = logging.getLogger()
11
+ logger.setLevel(logging.INFO)
12
+ assert check_log_level(logger, logging.DEBUG) is False
13
14
+ def test_actual_loglevel_below_input_should_return_true(self, *_):
15
16
17
+ assert check_log_level(logger, logging.WARNING)
0 commit comments