# expiry: session TTL=2 s, then normal TTL
# date: 2026-10-14 20:27:07, commit: 0ab3a34 + uncommitted changes
# command: python.exe student-tests/test_expiry.py
# exit code: 0, 17.1 s

recreating api with SESSION_TTL_SECONDS=2
session issued, expires in 2.00 s; Redis TTL of the key: 1700 ms
before expiry: GET /users/me -> 200
after expiry: GET /users/me -> 401; key exists in Redis: 0
recreating api with SESSION_TTL_SECONDS from .env
normal API again: new session expires in 3600 s
PASS: session expires after SESSION_TTL_SECONDS and is rejected with 401
1 passed, 0 failed
