mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
test: fix tests
This commit is contained in:
parent
3e8c8ef507
commit
11e3ee4411
4 changed files with 24 additions and 12 deletions
|
@ -179,9 +179,11 @@ def test_call_with_key_over_budget(custom_db_client):
|
|||
# 5. Make a call with a key over budget, expect to fail
|
||||
setattr(litellm.proxy.proxy_server, "custom_db_client", custom_db_client)
|
||||
setattr(litellm.proxy.proxy_server, "master_key", "sk-1234")
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm._logging import verbose_proxy_logger, verbose_logger
|
||||
import logging
|
||||
|
||||
litellm.set_verbose = True
|
||||
verbose_logger.setLevel(logging.DEBUG)
|
||||
verbose_proxy_logger.setLevel(logging.DEBUG)
|
||||
try:
|
||||
|
||||
|
@ -229,6 +231,7 @@ def test_call_with_key_over_budget(custom_db_client):
|
|||
"user_api_key_user_id": user_id,
|
||||
}
|
||||
},
|
||||
"response_cost": 0.00002,
|
||||
},
|
||||
completion_response=resp,
|
||||
)
|
||||
|
@ -301,6 +304,7 @@ def test_call_with_key_over_budget_stream(custom_db_client):
|
|||
"user_api_key_user_id": user_id,
|
||||
}
|
||||
},
|
||||
"response_cost": 0.00002,
|
||||
},
|
||||
completion_response=ModelResponse(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue