From cca7ab8b1b890b4153fbc8c00452d0c95d1d9dd7 Mon Sep 17 00:00:00 2001 From: yassin Date: Fri, 18 Sep 2026 21:50:16 +0000 Subject: [PATCH] test(mcp): type the REST allowlist test stubs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../proxy/_experimental/mcp_server/test_rest_endpoints.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py index 21de380f831..fccec57bb0c 100644 --- a/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py +++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py @@ -4332,11 +4332,15 @@ class TestClientAllowlistOnRestRoutes: def _stub_listing(monkeypatch: pytest.MonkeyPatch) -> list[UserAPIKeyAuth]: listed_for: list[UserAPIKeyAuth] = [] - async def fake_contexts(user_api_key_auth): + async def fake_contexts(user_api_key_auth: UserAPIKeyAuth) -> list[UserAPIKeyAuth]: listed_for.append(user_api_key_auth) return [user_api_key_auth] - async def fake_get_allowed_mcp_servers(*args, **kwargs): + async def fake_get_allowed_mcp_servers( + user_api_key_auth: UserAPIKeyAuth | None = None, + *, + keyless_source: bool = False, + ) -> list[str]: return [] monkeypatch.setattr("litellm.proxy.proxy_server.general_settings", _CLIENT_ALLOWLIST_SETTINGS, raising=False)