mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(auto-router): isolate member preview authorization cache
This commit is contained in:
parent
60b4e2a530
commit
8ef7ce203e
1 changed files with 2 additions and 0 deletions
|
|
@ -3181,6 +3181,7 @@ def _configure_member_preview(
|
|||
) -> UserAPIKeyAuth:
|
||||
from litellm.proxy import proxy_server
|
||||
from litellm.proxy._types import UI_TEAM_ID, LiteLLM_TeamTable
|
||||
from litellm.proxy.common_utils.user_api_key_cache import UserApiKeyCache
|
||||
|
||||
team: Final = LiteLLM_TeamTable(
|
||||
team_id="member-preview-team",
|
||||
|
|
@ -3192,6 +3193,7 @@ def _configure_member_preview(
|
|||
prisma.db.litellm_teamtable.find_unique = AsyncMock(return_value=team)
|
||||
prisma.db.litellm_teammembership.find_unique = AsyncMock(return_value=None)
|
||||
monkeypatch.setattr(proxy_server, "prisma_client", prisma)
|
||||
monkeypatch.setattr(proxy_server, "user_api_key_cache", UserApiKeyCache())
|
||||
monkeypatch.setattr(proxy_server, "premium_user", True)
|
||||
return UserAPIKeyAuth(
|
||||
user_role=LitellmUserRoles.INTERNAL_USER,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue