mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(mcp): type the REST allowlist test stubs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
0536fb3062
commit
cca7ab8b1b
1 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue