litellm/tests/test_litellm/proxy/anthropic_endpoints
Yuneng Jiang 5b9c7be558
test: isolate proxy master_key/prisma_client module globals between tests
Sibling tests were mutating litellm.proxy.proxy_server.master_key and
prisma_client with raw setattr. Values leaked across tests in the same
xdist worker, flipping the auth short-circuit in user_api_key_auth and
causing unrelated tests (e.g. test_ui_view_session_spend_logs_pagination)
to return 401 instead of 200.

Replace raw setattr with monkeypatch in the two offending files and add
an autouse conftest fixture that snapshots/restores the known-leaky
module globals for every proxy test.
2026-04-23 15:31:16 -07:00
..
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_claude_code_marketplace.py test: isolate proxy master_key/prisma_client module globals between tests 2026-04-23 15:31:16 -07:00
test_endpoints.py [Fix] 404 Not Found on /api/event_logging/batch endpoint (#20504) 2026-02-05 10:58:08 -08:00