headroom/tests/test_scripts
Adryan Eka Vandra 30e7b7c498
test(scripts): restore real websockets module before repro smoke test
Some earlier tests in the suite replace sys.modules['websockets'] with
a stub. When the smoke test ran after those, uvicorn's
websockets-sansio backend tried to import websockets.server at connect
time, resolved through the stub, and failed with
'No module named websockets.server; websockets is not a package',
preventing the mock proxy from starting.

Add an autouse fixture that drops stub websockets.* entries from
sys.modules, re-imports the real package + websockets.asyncio.server,
and restores prior state on teardown. Keeps the smoke test
deterministic regardless of collection order.
2026-04-20 22:02:40 +07:00
..
__init__.py feat(scripts): add Codex proxy reconnect-storm repro harness 2026-04-20 22:02:02 +07:00
test_repro_codex_replay_smoke.py test(scripts): restore real websockets module before repro smoke test 2026-04-20 22:02:40 +07:00