# 2026-11-22T19:19:59Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
$ python3 student-tests/test_api.py
## API, auth, validation, ACL, transactions (https://127.0.0.1:8443)
PASS password stored only as Argon2id hash (lab7; salt+params in PHC); User has no secret fields   0.65s
PASS wrong password and unknown user: identical 401 + Basic challenge   0.18s
PASS malformed Basic / Bearer on /auth/sessions / body on login       0.04s
PASS password with ':' and non-ASCII UTF-8 works (RFC 7617)           0.15s
PASS opaque 256-bit token, unique per login, DB stores only SHA-256   0.82s
PASS only Bearer accepted; Basic and X-User-Id never authenticate     0.04s
PASS logout revokes only the current session; repeat -> 401           0.52s
PASS strict JSON validation -> 400                                    0.11s
PASS message text: 4000 code points OK, 4001 / whitespace / sender_id -> 400   0.06s
PASS SQL is parameterized: injection payloads stored verbatim         0.03s
PASS ACL: outsider gets 404 everywhere (even for invalid body)        0.06s
PASS create chat validation: duplicates, caller missing, unknown member   0.03s
PASS compound create-chat rolls back on FK failure (no orphan chat)   1.05s  chats before=4, failed insert left 0 rows
PASS registration race: 20 parallel same username -> exactly one 201   0.80s  201x1, 409x19, rows=1
PASS keyset pagination: 120 msgs, varying limit, no gaps/duplicates   2.22s  4 pages
PASS chat list: only own chats, ordered, cursor bound to user         0.17s
PASS read-after-write: confirmed message visible to next read         0.02s
PASS unknown route 404 / wrong method 405 in error format             0.01s
summary: 18 passed, 0 failed
exit=0
