Skip to content

Commit 0cdf61d

Browse files
committed
now actually fixed
Signed-off-by: Jonathan Bnayahu <[email protected]>
1 parent 9d96f74 commit 0cdf61d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/library/test_cli.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,16 @@ def test_save_results_to_disk_summary_only(
751751
# --- Arrange ---
752752
# (Arrange section remains the same as previous version)
753753
mock_timestamp = "2025-04-14T10:00:00"
754+
mock_timestamp_utc = "2025-04-14T08:00:00"
754755
mock_now = MagicMock()
755756
mock_now.strftime.return_value = mock_timestamp
757+
mock_astimezone = MagicMock()
758+
mock_astimezone.strftime.return_value = mock_timestamp_utc
759+
mock_now.astimezone.return_value = mock_astimezone
756760
mock_datetime.now.return_value = mock_now
757761
mock_utcnow = MagicMock()
758762
mock_utcnow.isoformat.return_value = "2025-04-14T08:00:00"
759763
mock_datetime.utcnow.return_value = mock_utcnow
760-
mock_astimezone = MagicMock()
761-
mock_astimezone.strftime.return_value = "2025-04-14T08:00:00"
762764

763765
args = argparse.Namespace(
764766
log_samples=False,
@@ -786,7 +788,9 @@ def test_save_results_to_disk_summary_only(
786788
}
787789
base_results_path = "/out/results_prefix.json"
788790
base_samples_path = "/out/results_prefix_samples.json"
789-
expected_timestamped_results_path = f"/out/{mock_timestamp}_results_prefix.json"
791+
expected_timestamped_results_path = (
792+
f"/out/{mock_timestamp_utc}_results_prefix.json"
793+
)
790794

791795
# --- Act ---
792796
cli._save_results_to_disk(
@@ -846,7 +850,7 @@ def test_save_results_to_disk_summary_only(
846850
)
847851
log_calls = [call[0][0] for call in mock_logger.info.call_args_list]
848852
expected_timestamped_samples_path = (
849-
f"/out/{mock_timestamp}_results_prefix_samples.json"
853+
f"/out/{mock_timestamp_utc}_results_prefix_samples.json"
850854
)
851855
self.assertNotIn(
852856
f"Saving detailed samples to: {expected_timestamped_samples_path}",

0 commit comments

Comments
 (0)