From 55feece2b51aaeab54fba13c0df37b2d7e4d38fe Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 7 Aug 2024 15:37:02 -0700 Subject: [PATCH] fix test_team_update_redis --- litellm/tests/test_proxy_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/tests/test_proxy_server.py b/litellm/tests/test_proxy_server.py index b0a972bddc..e69e6b76a2 100644 --- a/litellm/tests/test_proxy_server.py +++ b/litellm/tests/test_proxy_server.py @@ -31,7 +31,7 @@ logging.basicConfig( format="%(asctime)s - %(levelname)s - %(message)s", ) -from unittest.mock import AsyncMock, MagicMock, patch +from unittest.mock import AsyncMock, patch from fastapi import FastAPI @@ -757,7 +757,7 @@ async def test_team_update_redis(): with patch.object( proxy_logging_obj.internal_usage_cache.redis_cache, "async_set_cache", - new=MagicMock(), + new=AsyncMock(), ) as mock_client: await _cache_team_object( team_id="1234", @@ -766,7 +766,7 @@ async def test_team_update_redis(): proxy_logging_obj=proxy_logging_obj, ) - mock_client.assert_called_once() + mock_client.assert_called() @pytest.mark.asyncio @@ -794,7 +794,7 @@ async def test_get_team_redis(client_no_auth): user_api_key_cache=DualCache(), parent_otel_span=None, proxy_logging_obj=proxy_logging_obj, - prisma_client=MagicMock(), + prisma_client=AsyncMock(), ) except Exception as e: pass