mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
test: satisfy the test-quality gates upstream added under ruff-tests and TQ002
This commit is contained in:
parent
a6458b5a22
commit
6a6e5877d9
2 changed files with 3 additions and 2 deletions
|
|
@ -541,7 +541,7 @@ async def test_auth_failure_on_a_key_route_does_not_hand_the_key_to_the_failure_
|
|||
"litellm.proxy.proxy_server.general_settings",
|
||||
{"allow_requests_on_db_unavailable": False},
|
||||
):
|
||||
with pytest.raises(Exception):
|
||||
with pytest.raises(ProxyException):
|
||||
await handler._handle_authentication_error(
|
||||
HTTPException(status_code=401, detail="Invalid proxy server token passed"),
|
||||
MagicMock(),
|
||||
|
|
|
|||
|
|
@ -17299,11 +17299,12 @@ async def test_key_budgets_never_read_the_proxy_budget_row_for_a_caller_who_may_
|
|||
_budgets_world(**_fully_populated_world()),
|
||||
patch(f"{_BUDGETS_RESOLVER}.UserRepository", user_repository),
|
||||
):
|
||||
await resolve_key_budgets(
|
||||
budgets = await resolve_key_budgets(
|
||||
valid_token=_budgets_token(), end_user_id=None, deps=_budgets_deps(proxy_spend_visible=False)
|
||||
)
|
||||
|
||||
user_repository.return_value.find_by_id.assert_not_awaited()
|
||||
assert next(e for e in budgets if e.scope == "proxy").spend_state == "restricted"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue