File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from pyproxy .utils .logger import configure_console_logger , configure_file_logger
1313
1414
15+ class DummyLoggerConfig :
16+ def __init__ (self , console_format = None , datefmt = None ):
17+ self .console_format = console_format or "%(log_color)s%(asctime)s - %(levelname)s - %(message)s"
18+ self .datefmt = datefmt or "%d/%m/%Y %H:%M:%S"
19+
20+
1521class TestLogger (unittest .TestCase ):
1622 """
1723 Test suite for the logger module.
@@ -26,7 +32,8 @@ def test_configure_console_logger(self, mock_stdout):
2632 - Checks that the log level is set to INFO.
2733 - Verifies that the handler is a StreamHandler.
2834 """
29- logger = configure_console_logger ()
35+ logger_config = DummyLoggerConfig ()
36+ logger = configure_console_logger (logger_config )
3037
3138 self .assertTrue (logger .hasHandlers ())
3239 self .assertEqual (logger .level , logging .INFO )
You can’t perform that action at this time.
0 commit comments