Skip to content

Commit

Permalink
Refactor logging setup and fix unit tests for LoggerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
yihong1120 committed Jul 16, 2024
1 parent 638a734 commit d77173c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/monitor_logger_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def test_logger_output(
# Test logging output
with self.assertLogs(logger, level='INFO') as log:
logger.info('Test log message')
self.assertIn(
'INFO:SiteSafetyMonitor_test.log:Test log message', log.output,
)
expected_message = 'INFO:SiteSafetyMonitor_test.log:Test log message'.upper()
log_messages = [msg.upper() for msg in log.output]
self.assertIn(expected_message, log_messages)

def tearDown(self):
# Clean up any files or directories created during tests
Expand Down

0 comments on commit d77173c

Please sign in to comment.