Просмотр исходного кода

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 неделя назад
Родитель
Сommit
192609e86b
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      tests/integration/test_hardware.py
  2. 1 1
      tests/integration/test_playlist.py

+ 1 - 1
tests/integration/test_hardware.py

@@ -409,7 +409,7 @@ class TestWebSocketConnection:
         # Connect to WebSocket
         # Connect to WebSocket
         with client.websocket_connect("/ws/status") as websocket:
         with client.websocket_connect("/ws/status") as websocket:
             # Should receive initial status
             # Should receive initial status
-            data = websocket.receive_json(timeout=5)
+            data = websocket.receive_json()
 
 
             # Verify status structure
             # Verify status structure
             assert "is_running" in data or "current_file" in data, \
             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)
             client = TestClient(app)
 
 
             with client.websocket_connect("/ws/status") as websocket:
             with client.websocket_connect("/ws/status") as websocket:
-                data = websocket.receive_json(timeout=5)
+                data = websocket.receive_json()
 
 
                 print(f"WebSocket status: {data}")
                 print(f"WebSocket status: {data}")