From 0bc1bd6871a423677c599ba6a75e9b2f367cd9a6 Mon Sep 17 00:00:00 2001 From: Joe Reyna Date: Mon, 9 Mar 2026 07:13:50 -0700 Subject: [PATCH] fix(tests): use AsyncMock for prisma find_unique in agent get-by-id test (#23122) --- tests/test_litellm/proxy/agent_endpoints/test_endpoints.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py b/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py index 00d08504fe5..3c8e1c75559 100644 --- a/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py +++ b/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py @@ -295,6 +295,9 @@ class TestAgentRBACInternalUser: return_value=_sample_agent_response() ) with patch("litellm.proxy.proxy_server.prisma_client") as mock_prisma: + mock_prisma.db.litellm_agentstable.find_unique = AsyncMock( + return_value=None + ) resp = self.internal_client.get( "/v1/agents/agent-123", headers={"Authorization": "Bearer k"} )