forked from cartsnitch/api
fix(tests): use date.today() for seed ANCHOR_DATE to stay within 90-day trend window
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user