From 78c4f3586af3cb29dd9a85d36fa6f3948982aa49 Mon Sep 17 00:00:00 2001 From: leefer Date: Sat, 1 Aug 2026 01:26:12 +0800 Subject: [PATCH] test: make preservation audit stable across trading days --- tests/test_stock_detail_realtime.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_stock_detail_realtime.py b/tests/test_stock_detail_realtime.py index b33743a..010d701 100644 --- a/tests/test_stock_detail_realtime.py +++ b/tests/test_stock_detail_realtime.py @@ -46,7 +46,7 @@ class RealtimeClientStub: class FixedMarketDatetime(datetime): - fixed_now = datetime.now().astimezone().replace(hour=10, minute=30, second=0, microsecond=0) + fixed_now = datetime(2026, 7, 31, 10, 30).astimezone() @classmethod def now(cls, tz=None): @@ -54,7 +54,7 @@ class FixedMarketDatetime(datetime): class FixedPreopenDatetime(datetime): - fixed_now = datetime.now().astimezone().replace(hour=8, minute=45, second=0, microsecond=0) + fixed_now = datetime(2026, 7, 31, 8, 45).astimezone() @classmethod def now(cls, tz=None):