From a6f052882b825880316158dbce4000b3de1da5ee Mon Sep 17 00:00:00 2001 From: Michal Otmianowski Date: Thu, 21 Aug 2025 12:10:29 +0200 Subject: [PATCH] fix test --- litellm/caching/s3_cache.py | 2 +- tests/test_litellm/caching/test_s3_cache.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/caching/s3_cache.py b/litellm/caching/s3_cache.py index dbf5164b08b..15f7a5c1e16 100644 --- a/litellm/caching/s3_cache.py +++ b/litellm/caching/s3_cache.py @@ -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) diff --git a/tests/test_litellm/caching/test_s3_cache.py b/tests/test_litellm/caching/test_s3_cache.py index 7fbb7f316cb..dce3f7d585d 100644 --- a/tests/test_litellm/caching/test_s3_cache.py +++ b/tests/test_litellm/caching/test_s3_cache.py @@ -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):