mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
test(proxy): mark prisma_client patch in /key/list alias test with test-quality reason
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
df6ec79810
commit
02dbff485b
1 changed files with 3 additions and 1 deletions
|
|
@ -15226,7 +15226,9 @@ def _list_team_a_keys_as(user_role, members_with_roles, query):
|
|||
test_app = FastAPI()
|
||||
test_app.include_router(router)
|
||||
test_app.dependency_overrides[user_api_key_auth] = lambda: UserAPIKeyAuth(user_role=user_role, user_id="alice")
|
||||
with patch("litellm.proxy.proxy_server.prisma_client", mock_prisma_client):
|
||||
with patch( # test-quality-ok: /key/list reads the prisma client from the proxy_server module global, no injection point
|
||||
"litellm.proxy.proxy_server.prisma_client", mock_prisma_client
|
||||
):
|
||||
response = TestClient(test_app).get(
|
||||
f"/key/list?team_id=team-a&include_team_keys=true&include_created_by_keys=true&{query}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue