Files
tick-stock-panel/backend/tests
im47cn 5f1c1cf0bb fix(test): replace hardcoded dates with cn_today() in test_live_enriched_metadata
test_history_strategy_monitor_keeps_live_row_with_exclude_st_enabled used
date(2026,7,20) as the "today" value, but MonitorRuleEngine.evaluate()
calls cn_today() internally. The date mismatch caused the basic_filter
+ history filter to produce 0 rows, making the test fail 8 days after
it was written.

Also fixes test_live_enriched_cache_keeps_instrument_metadata_without_persisting_it
which used the same hardcoded date — would break on any future run.

Replace all hardcoded dates with cn_today() / cn_today()-timedelta(days=3)
so the tests are timeless.
2026-07-28 09:46:51 +08:00
..