Commit Graph

1 Commits

Author SHA1 Message Date
evan188199-tech
0a2c316737 test(api): add contract tests for upload guards, quiz judge, reading progress, notebook and memory routers (#1709)
* test(api): lock knowledge-base upload and delete guard contracts

* test(api): unit-cover the quiz-judge WebSocket router

* test(reading): pin the reading progress API durability contract

* test(notebook): pin the question notebook API source, dedup and concurrency contract

* test(memory): cover the memory workbench router contract

* test(codebuddy): make credential fixture expiry relative to now

test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.

Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:28:50 +08:00