fix(tests): use date.today() for seed ANCHOR_DATE to stay within 90-day trend window
CI / typecheck (push) Successful in 18s
CI / build-and-push (pull_request) Has been skipped
CI / lint (push) Successful in 8s
CI / lint (pull_request) Successful in 4s
CI / test (push) Successful in 22s
CI / test (pull_request) Successful in 21s
CI / build-and-push (push) Successful in 1m39s
CI / typecheck (pull_request) Successful in 32s

Hardcoded date(2026, 3, 15) fell outside the 90-day lookback on 2026-06-23,
causing test_public_trend_returns_data to see 0 data_points instead of >=2.
This commit is contained in:
cs_carl
2026-06-23 12:50:40 +00:00
parent 135064fc10
commit 7c14b33799
+2 -2
View File
@@ -26,8 +26,8 @@ from cartsnitch_api.models import (
# Shared test constants
ZERO_UUID = "00000000-0000-0000-0000-000000000000"
BAD_UUID = "not-a-uuid"
# Fixed anchor date for deterministic tests
ANCHOR_DATE = date(2026, 3, 15)
# Anchor relative to today so price history seed data stays within the 90-day trend window.
ANCHOR_DATE = date.today()
@pytest.fixture