summaryrefslogtreecommitdiff
path: root/tests/unit/test__logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test__logging.py')
-rw-r--r--tests/unit/test__logging.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/unit/test__logging.py b/tests/unit/test__logging.py
new file mode 100644
index 0000000..9248f86
--- /dev/null
+++ b/tests/unit/test__logging.py
@@ -0,0 +1,24 @@
+import logging
+
+import pytest
+
+from gitlab import _logging
+
+
+@pytest.fixture
+def LOG():
+ return logging.getLogger(_logging._module_root_logger_name)
+
+
+def test_module_root_logger_name():
+ assert _logging._module_root_logger_name == "gitlab"
+
+
+def test_module_name(LOG):
+ assert LOG.name == "gitlab"
+
+
+def test_logger_null_handler(LOG):
+ assert len(LOG.handlers) == 1
+ handler = LOG.handlers[0]
+ assert isinstance(handler, logging.NullHandler)