def test_health_endpoint(client): response = client.get("/health") assert response.status_code == 200 assert response.json() == {"status": "ok", "service": "SegServer"} def test_websocket_progress_heartbeat(client): with client.websocket_connect("/ws/progress") as websocket: websocket.send_text("ping") data = websocket.receive_json() assert data["type"] == "status" assert data["status"] == "connected" assert data["message"] == "Progress stream active"