Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit d0adc8e

Browse files
[client] Move the logger test call present in the logger module to the test file. (#527)
1 parent 665f2e1 commit d0adc8e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pycti/utils/opencti_logger.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,3 @@ def error(self, message, meta=None):
5959
)
6060

6161
return AppLogger
62-
63-
64-
test_logger = logger("INFO")("test")

tests/01-unit/metric/test_opencti_metric_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
from prometheus_client import Counter, Enum
44

55
from pycti import OpenCTIMetricHandler
6-
from pycti.utils.opencti_logger import test_logger
6+
from pycti.utils.opencti_logger import logger
77

88

99
class TestOpenCTIMetricHandler(TestCase):
1010
def test_metric_exists(self):
11+
test_logger = logger("INFO")("test")
1112
metric = OpenCTIMetricHandler(test_logger, activated=True)
1213
self.assertTrue(metric._metric_exists("error_count", Counter))
1314
self.assertFalse(metric._metric_exists("error_count", Enum))

0 commit comments

Comments
 (0)