mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix: fix tests
This commit is contained in:
parent
b3a8c2885b
commit
1a031e0046
2 changed files with 5 additions and 4 deletions
|
@ -65,13 +65,14 @@ async def test_completion_with_caching_bad_call():
|
||||||
- Assert failure callback gets called
|
- Assert failure callback gets called
|
||||||
"""
|
"""
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
sl = ServiceLogging(mock_testing=True)
|
|
||||||
try:
|
try:
|
||||||
from litellm.caching import RedisCache
|
from litellm.caching import RedisCache
|
||||||
|
|
||||||
litellm.service_callback = ["prometheus_system"]
|
litellm.service_callback = ["prometheus_system"]
|
||||||
|
sl = ServiceLogging(mock_testing=True)
|
||||||
|
|
||||||
RedisCache(host="hello-world", **{"service_logger_obj": sl})
|
RedisCache(host="hello-world", service_logger_obj=sl)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Receives exception = {str(e)}")
|
print(f"Receives exception = {str(e)}")
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ async def test_router_async_caching_with_ssl_url():
|
||||||
"rpm": 10000,
|
"rpm": 10000,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
redis_url=os.getenv("REDIS_URL"),
|
redis_url=os.getenv("REDIS_SSL_URL"),
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await router.cache.redis_cache.ping()
|
response = await router.cache.redis_cache.ping()
|
||||||
|
@ -60,7 +60,7 @@ def test_router_sync_caching_with_ssl_url():
|
||||||
"rpm": 10000,
|
"rpm": 10000,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
redis_url=os.getenv("REDIS_URL"),
|
redis_url=os.getenv("REDIS_SSL_URL"),
|
||||||
)
|
)
|
||||||
|
|
||||||
response = router.cache.redis_cache.sync_ping()
|
response = router.cache.redis_cache.sync_ping()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue