fix(test): de-calendar employers auth wall-clock pin (cherry of CI #149 red-triage fix from the main lane)
This commit is contained in:
@@ -120,7 +120,9 @@ class TestSessionGate:
|
||||
T+8d → the session reads as absent → 401 (no sleeps)."""
|
||||
from .conftest import make_client
|
||||
|
||||
login_at = datetime(2026, 9, 30, 12, 0, 0, tzinfo=UTC)
|
||||
# Wall-clock-relative mint: the 200 arm below must hold on ANY
|
||||
# run date (the fixed 2026-09-30 mint turned red at 2026-10-07+).
|
||||
login_at = datetime.now(UTC) - timedelta(days=1)
|
||||
employer_store.insert_account(
|
||||
email=TEST_EMAIL, password_hash="scrypt$16384$8$1$c2FsdA$aGFzaA"
|
||||
)
|
||||
@@ -140,7 +142,7 @@ class TestSessionGate:
|
||||
)
|
||||
assert row is None # expired — reads as absent
|
||||
resp = c.get("/v1/employers/auth/me", headers=bearer("expired-token"))
|
||||
# Wall clock (2026-09-30) is INSIDE the 7-day TTL → 200.
|
||||
# Wall clock (1d after mint) is INSIDE the 7-day TTL → 200.
|
||||
assert resp.status_code == 200
|
||||
# The lazy-TTL route 401 pin: a session whose expires_at is in
|
||||
# the WALL-CLOCK past reads as absent at the route.
|
||||
|
||||
Reference in New Issue
Block a user