Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/mcp_tests/test_proxy_mcp_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def _clear_proxy_database_env() -> typing.Iterator[None]:
"""Ensure local proxy DB settings don't leak into tests."""
mp = pytest.MonkeyPatch()
mp.delenv("DATABASE_URL", raising=False)
# The FastAPI lifespan event (proxy_startup_event) re-reads master_key from
# the LITELLM_MASTER_KEY env var, overriding whatever initialize() set from
# the config file. We must set it here so the lifespan doesn't reset it to None.
mp.setenv("LITELLM_MASTER_KEY", "sk-1234")
try:
yield
finally:
Expand Down
Loading