Local changes: Updated model training, removed debug instrumentation, and configuration improvements
This commit is contained in:
32
tests/integration/backend/test_websocket_connections.py
Normal file
32
tests/integration/backend/test_websocket_connections.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""Integration tests for WebSocket connections."""
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from backend.main import app
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
"""Test client fixture."""
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestWebSocketConnection:
|
||||
"""Test WebSocket connections."""
|
||||
|
||||
def test_websocket_connection(self, client):
|
||||
"""Test WebSocket connection."""
|
||||
with client.websocket_connect("/ws/") as websocket:
|
||||
# Connection should be established
|
||||
assert websocket is not None
|
||||
|
||||
def test_websocket_message_handling(self, client):
|
||||
"""Test WebSocket message handling."""
|
||||
with client.websocket_connect("/ws/") as websocket:
|
||||
# Send a test message
|
||||
websocket.send_json({"type": "ping"})
|
||||
# WebSocket should accept the connection
|
||||
# Note: Actual message handling depends on implementation
|
||||
|
||||
Reference in New Issue
Block a user