Sfoglia il codice sorgente

fix(test): remove unsupported timeout arg from receive_json()

FastAPI TestClient's WebSocket receive_json() doesn't accept timeout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 settimana fa
parent
commit
192609e86b

+ 1 - 1
tests/integration/test_hardware.py

@@ -409,7 +409,7 @@ class TestWebSocketConnection:
         # Connect to WebSocket
         with client.websocket_connect("/ws/status") as websocket:
             # Should receive initial status
-            data = websocket.receive_json(timeout=5)
+            data = websocket.receive_json()
 
             # Verify status structure
             assert "is_running" in data or "current_file" in data, \

+ 1 - 1
tests/integration/test_playlist.py

@@ -458,7 +458,7 @@ class TestWebSocketStatus:
             client = TestClient(app)
 
             with client.websocket_connect("/ws/status") as websocket:
-                data = websocket.receive_json(timeout=5)
+                data = websocket.receive_json()
 
                 print(f"WebSocket status: {data}")