From f2bb07dffcd0b017c376efb4b61a3811c06015c5 Mon Sep 17 00:00:00 2001 From: Yucheng Zhu Date: Fri, 24 Jul 2026 01:15:02 -0700 Subject: [PATCH] test(proxy/batches): default harness prisma_client to None The batch routing harness left proxy_server.prisma_client at its module global, which a sibling test in the same shard can leave as a MagicMock. The unified-file rows that do not opt into managed-file resolution then entered the resolver and awaited a non-awaitable mock, surfacing as a 503. Patch prisma_client to None by default so those rows stay a no-op; resolution tests still override it explicitly --- tests/test_litellm/proxy/batches_endpoints/test_endpoints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_litellm/proxy/batches_endpoints/test_endpoints.py b/tests/test_litellm/proxy/batches_endpoints/test_endpoints.py index 2aa16d041d4..3092da9e1e5 100644 --- a/tests/test_litellm/proxy/batches_endpoints/test_endpoints.py +++ b/tests/test_litellm/proxy/batches_endpoints/test_endpoints.py @@ -198,6 +198,10 @@ def harness(): stack.enter_context(patch.object(proxy_server, "general_settings", {})) stack.enter_context(patch.object(proxy_server, "proxy_config", MagicMock())) stack.enter_context(patch.object(proxy_server, "version", "test-version")) + # Default to a database-less proxy so managed-file resolution is a no-op + # unless a test opts in; keeps the routing rows that do not exercise it + # deterministic regardless of cross-file prisma_client pollution. + stack.enter_context(patch.object(proxy_server, "prisma_client", None)) h = Harness( body=body_holder,