mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
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
This commit is contained in:
parent
0a33ea40c6
commit
f2bb07dffc
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue