- WebSocketTestClient – Real websocket client powered by
websockets, designed for integration tests; captures traces for assertions. - WebSocketSimulator – In-memory fake implementing the WebSocket protocol for fast unit tests.
- Pytest fixtures – See
tests/behaviour/*.featureandfalcon_pachinko/unittestshelpers for factory utilities.
Recommended strategy:
- Unit test pure resource logic with
WebSocketSimulator. - Behavioural tests with
pytest-bddto exercise router composition, hooks, DI, and connection manager flows. - Worker tests using the
WorkerControllerfixture fromtests/behaviour/lifespan_workers.feature.