mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
test(local_testing): point test_router_timeout and test_timeout at the unroutable api_base
This commit is contained in:
parent
e17fae7ec5
commit
14fff73967
2 changed files with 4 additions and 2 deletions
|
|
@ -1541,7 +1541,7 @@ def test_router_anthropic_key_dynamic():
|
|||
os.environ["ANTHROPIC_API_KEY"] = anthropic_api_key
|
||||
|
||||
|
||||
def test_router_timeout():
|
||||
def test_router_timeout(unroutable_api_base):
|
||||
litellm.set_verbose = True
|
||||
import logging
|
||||
|
||||
|
|
@ -1554,6 +1554,7 @@ def test_router_timeout():
|
|||
"litellm_params": {
|
||||
"model": "gpt-3.5-turbo",
|
||||
"api_key": "os.environ/OPENAI_API_KEY",
|
||||
"api_base": unroutable_api_base,
|
||||
},
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -43,12 +43,13 @@ async def test_httpx_timeout(model, provider, sync_mode):
|
|||
print(f"response: {response}")
|
||||
|
||||
|
||||
def test_timeout():
|
||||
def test_timeout(unroutable_api_base):
|
||||
# this Will Raise a timeout
|
||||
litellm.set_verbose = False
|
||||
try:
|
||||
response = litellm.completion(
|
||||
model="gpt-3.5-turbo",
|
||||
api_base=unroutable_api_base,
|
||||
timeout=0.01,
|
||||
messages=[{"role": "user", "content": "hello, write a 20 pg essay"}],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue