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