def test_websocket_route(websocket_service: WebsocketService, expected_response, side_effect, path, regex): websocket_service.route(path, regex=regex)(side_effect) conn = _connect(websocket_service) assert conn.recv() == expected_response
def test_websocket_double_route(websocket_service: WebsocketService): websocket_service.route("test")("test") with raises(RuntimeError): websocket_service.route("test")("test")