11import json
22import logging
3- import logging .config
43import os
54
65import pytest
76
87from common .core .logging import JsonFormatter
98
109
11- @pytest .mark .freeze_time ("2023-12-08T06:05:47.320000 +00:00" )
10+ @pytest .mark .freeze_time ("2023-12-08T06:05:47+00:00" )
1211def test_json_formatter__outputs_expected (
1312 caplog : pytest .LogCaptureFixture ,
1413 request : pytest .FixtureRequest ,
@@ -25,7 +24,7 @@ def test_json_formatter__outputs_expected(
2524 expected_tb_string = (
2625 "Traceback (most recent call last):\n "
2726 f' File "{ expected_module_path } ",'
28- " line 34 , in _log_traceback\n "
27+ " line 33 , in _log_traceback\n "
2928 " raise Exception()\n Exception"
3029 )
3130
@@ -44,15 +43,15 @@ def _log_traceback() -> None:
4443 {
4544 "levelname" : "INFO" ,
4645 "message" : "hello arg1, 22" ,
47- "timestamp" : "2023-12-08 06:05:47,319 " ,
46+ "timestamp" : "2023-12-08 06:05:47,000 " ,
4847 "logger_name" : "test_json_formatter__outputs_expected" ,
4948 "pid" : expected_pid ,
5049 "thread_name" : "MainThread" ,
5150 },
5251 {
5352 "levelname" : "ERROR" ,
5453 "message" : "this is an error" ,
55- "timestamp" : "2023-12-08 06:05:47,319 " ,
54+ "timestamp" : "2023-12-08 06:05:47,000 " ,
5655 "logger_name" : "test_json_formatter__outputs_expected" ,
5756 "pid" : expected_pid ,
5857 "thread_name" : "MainThread" ,
0 commit comments