Mock server_root_path for test

This commit is contained in:
yuneng-jiang
2025-12-05 16:13:56 -08:00
parent 4d39a1a18f
commit 5afd03fef3

View File

@@ -91,6 +91,7 @@ def test_login_v2_returns_redirect_url_and_sets_cookie(monkeypatch):
monkeypatch.setattr("litellm.proxy.proxy_server.general_settings", {})
monkeypatch.setattr("litellm.proxy.proxy_server.premium_user", False)
monkeypatch.setattr("litellm.proxy.proxy_server.prisma_client", mock_prisma_client)
monkeypatch.setattr("litellm.proxy.utils.get_server_root_path", lambda: "")
client = TestClient(app)
response = client.post(