hack-house/tests/test_websocket.py
2026-01-02 23:35:20 +03:00

11 lines
318 B
Python

class TestWebSocket:
def test_ws_connect_no_user_id(self, test_client):
_, ws = test_client.websocket("/ws/chat")
assert ws is not None
def test_ws_connect_invalid_session(self, test_client):
_, ws = test_client.websocket("/ws/chat?user_id=invalid123")
assert ws is not None