mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix test
This commit is contained in:
parent
d53dd58c4d
commit
a6f052882b
2 changed files with 3 additions and 3 deletions
|
|
@ -106,7 +106,7 @@ class S3Cache(BaseCache):
|
|||
Compatible with Python 3.8+.
|
||||
"""
|
||||
try:
|
||||
verbose_logger.debug(f"LiteLLM ASYNC SET Cache - S3. Key={key}. Value={value}")
|
||||
verbose_logger.debug(f"Set ASYNC S3 Cache: Key={key}. Value={value}")
|
||||
loop = asyncio.get_event_loop()
|
||||
func = partial(self.set_cache, key, value, **kwargs)
|
||||
await loop.run_in_executor(None, func)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ def test_s3_cache_set_cache_with_ttl(mock_s3_dependencies):
|
|||
"""Test set_cache with TTL functionality"""
|
||||
cache = S3Cache("test-bucket")
|
||||
test_value = {"key": "value"}
|
||||
ttl = datetime.timedelta(seconds=3600) # 1 hour
|
||||
ttl = 3600 # 1 hour in seconds
|
||||
|
||||
cache.set_cache("test_key", test_value, ttl=ttl)
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ def test_s3_cache_set_cache_with_ttl(mock_s3_dependencies):
|
|||
|
||||
assert "Expires" in call_args[1]
|
||||
assert "CacheControl" in call_args[1]
|
||||
assert "max-age=1:00:00" in call_args[1]["CacheControl"]
|
||||
assert "max-age=3600" in call_args[1]["CacheControl"]
|
||||
|
||||
|
||||
def test_s3_cache_get_cache(mock_s3_dependencies):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue