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.
This commit is contained in:
mayuriphad 2026-10-05 11:59:55 +05:30
parent c1aec4ada1
commit a14fa8bb07

View file

@ -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()