forked from phoenix/litellm-mirror
fix(test_key_generate_prisma.py): pass user_api_key_dict to test call
This commit is contained in:
parent
606466d5fc
commit
e7f8ee2aba
2 changed files with 19 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
import copy
|
||||
import json
|
||||
import traceback
|
||||
import uuid
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import List, Optional
|
||||
|
@ -795,6 +796,11 @@ async def team_info(
|
|||
return {"team_id": team_id, "team_info": team_info, "keys": keys}
|
||||
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.error(
|
||||
"litellm.proxy.management_endpoints.team_endpoints.py::team_info - Exception occurred - {}\n{}".format(
|
||||
e, traceback.format_exc()
|
||||
)
|
||||
)
|
||||
if isinstance(e, HTTPException):
|
||||
raise ProxyException(
|
||||
message=getattr(e, "detail", f"Authentication Error({str(e)})"),
|
||||
|
|
|
@ -2419,12 +2419,19 @@ async def test_create_update_team(prisma_client):
|
|||
)
|
||||
|
||||
# now hit team_info
|
||||
try:
|
||||
response = await team_info(
|
||||
team_id=_team_id,
|
||||
http_request=Request(scope={"type": "http"}),
|
||||
user_api_key_dict=UserAPIKeyAuth(
|
||||
user_role=LitellmUserRoles.PROXY_ADMIN,
|
||||
api_key="sk-1234",
|
||||
user_id="1234",
|
||||
),
|
||||
)
|
||||
|
||||
print("RESPONSE from team_info", response)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pytest.fail("Receives error - {}".format(e))
|
||||
|
||||
_team_info = response["team_info"]
|
||||
_team_info = dict(_team_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue