From a14fa8bb078ec857e4551042f3036797a9969bd7 Mon Sep 17 00:00:00 2001 From: mayuriphad <163738104+mayuriphad@users.noreply.github.com> Date: Mon, 5 Oct 2026 11:59:55 +0530 Subject: [PATCH] test(caching): set redis_kwargs on the bare RedisCache in the no-pool disconnect test disconnect() now derives the pub/sub client cache key from redis_kwargs, so the instance built with __new__ needs it. --- tests/unit/caching/test_redis_cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/caching/test_redis_cache.py b/tests/unit/caching/test_redis_cache.py index acb845217c3..1b2c258a60a 100644 --- a/tests/unit/caching/test_redis_cache.py +++ b/tests/unit/caching/test_redis_cache.py @@ -432,6 +432,7 @@ async def test_disconnect_with_no_connection_pool_does_not_raise(): https://github.com/BerriAI/litellm/issues/37137.""" redis_cache = RedisCache.__new__(RedisCache) redis_cache.async_redis_conn_pool = None + redis_cache.redis_kwargs = {} redis_cache.redis_client = MagicMock() await redis_cache.disconnect()