mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
test(test_router_init.py): cleanup tests
This commit is contained in:
parent
ce39649b2a
commit
ea902f40de
1 changed files with 7 additions and 5 deletions
|
@ -59,7 +59,9 @@ def test_init_clients():
|
||||||
assert router.cache.get_cache(f"{model_id}_stream_async_client") is not None
|
assert router.cache.get_cache(f"{model_id}_stream_async_client") is not None
|
||||||
|
|
||||||
# check if timeout for stream/non stream clients is set correctly
|
# check if timeout for stream/non stream clients is set correctly
|
||||||
async_client = router.cache.get_cache(f"{model_id}_async_client")
|
from openai import AsyncAzureOpenAI
|
||||||
|
|
||||||
|
async_client: AsyncAzureOpenAI = router.cache.get_cache(f"{model_id}_async_client") # type: ignore
|
||||||
stream_async_client = router.cache.get_cache(
|
stream_async_client = router.cache.get_cache(
|
||||||
f"{model_id}_stream_async_client"
|
f"{model_id}_stream_async_client"
|
||||||
)
|
)
|
||||||
|
@ -70,12 +72,12 @@ def test_init_clients():
|
||||||
print()
|
print()
|
||||||
print(async_client._base_url)
|
print(async_client._base_url)
|
||||||
assert (
|
assert (
|
||||||
async_client._base_url
|
str(async_client._base_url)
|
||||||
== "https://openai-gpt-4-test-v-1.openai.azure.com//openai/"
|
== "https://openai-gpt-4-test-v-1.openai.azure.com/openai/"
|
||||||
) # openai python adds the extra /
|
) # openai python adds the extra /
|
||||||
assert (
|
assert (
|
||||||
stream_async_client._base_url
|
str(stream_async_client._base_url)
|
||||||
== "https://openai-gpt-4-test-v-1.openai.azure.com//openai/"
|
== "https://openai-gpt-4-test-v-1.openai.azure.com/openai/"
|
||||||
)
|
)
|
||||||
|
|
||||||
print("PASSED !")
|
print("PASSED !")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue