From e0726859ef028e3c90821f3881edd7e2c86e12c1 Mon Sep 17 00:00:00 2001 From: jibanez-staticduo Date: Fri, 18 Sep 2026 15:58:54 +0200 Subject: [PATCH] test(proxy): isolate live route scheduler --- tests/test_litellm/proxy/test_live_route_registration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_litellm/proxy/test_live_route_registration.py b/tests/test_litellm/proxy/test_live_route_registration.py index d280b9b1a30..80f3a5a9478 100644 --- a/tests/test_litellm/proxy/test_live_route_registration.py +++ b/tests/test_litellm/proxy/test_live_route_registration.py @@ -50,6 +50,8 @@ def test_public_live_websockets_reach_live_auth_before_legacy_sideband(monkeypat authenticate = AsyncMock(side_effect=HTTPException(403, "Live authentication rejected")) monkeypatch.setattr(live, "_auth", authenticate) monkeypatch.setattr(proxy_server, "general_settings", {}) + # A previous proxy test may leave the module scheduler bound to a closed loop. + monkeypatch.setattr(proxy_server, "scheduler", None) with TestClient(proxy_server.app) as client: with pytest.raises(WebSocketDisconnect): with client.websocket_connect(prefix + "/sessions" + suffix, headers={"authorization": "Bearer test"}):