From db0ad40e98883f7a04b0449c9513403427ceda3e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 4 Sep 2024 08:00:49 -0700 Subject: [PATCH] test for pl obj --- litellm/tests/test_caching.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/litellm/tests/test_caching.py b/litellm/tests/test_caching.py index db2e7e1c414..660cf68ea95 100644 --- a/litellm/tests/test_caching.py +++ b/litellm/tests/test_caching.py @@ -1985,3 +1985,14 @@ async def test_dual_cache_uses_redis(): value = await _cache_obj.async_get_cache(key=f"current_usage: {current_usage}") print("value from dual cache", value) assert value == 10 + + +@pytest.mark.asyncio() +async def test_proxy_logging_setup(): + """ + Assert always_read_redis is True when used by internal usage cache + """ + from litellm.proxy.utils import ProxyLogging + + pl_obj = ProxyLogging() + assert pl_obj.internal_usage_cache.always_read_redis is True