From 9db85f553d9d11cb03327d49f33c62d1a14afaaf Mon Sep 17 00:00:00 2001 From: yassin Date: Fri, 4 Sep 2026 01:56:45 +0000 Subject: [PATCH] test(sso): keep the debug-page outage test on the capture-gap path Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../proxy/management_endpoints/test_ui_sso.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py index 5609f576383..8d8bc15f9be 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py +++ b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py @@ -8274,18 +8274,17 @@ async def test_debug_page_is_byte_identical_when_no_id_jag_server_is_registered( @pytest.mark.asyncio -async def test_debug_page_survives_a_store_outage(caplog): +async def test_debug_page_survives_a_store_outage(monkeypatch, caplog): """The page's job is to render claims; an unreachable MCP table must cost it the annotation, not the page.""" from litellm.proxy.management_endpoints.ui_sso import warn_if_id_jag_capture_gap + monkeypatch.setenv("GOOGLE_CLIENT_ID", _GOOGLE_DEBUG_CLIENT_ID) + retention_check = AsyncMock(side_effect=Exception("db down")) with caplog.at_level(logging.WARNING, logger="LiteLLM Proxy"): - assert ( - await warn_if_id_jag_capture_gap( - retention_enabled=AsyncMock(side_effect=Exception("db down")) - ) - is None - ) + assert await warn_if_id_jag_capture_gap(retention_enabled=retention_check) is None + + retention_check.assert_awaited_once() assert _id_jag_gap_warnings(caplog) == []