mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-18 20:18:38 +00:00
* fix(tests): add app.dependency_overrides for auth in spend logs tests test_ui_view_spend_logs_with_status, test_ui_view_spend_logs_with_model, test_ui_view_spend_logs_with_model_id, and test_view_spend_logs_summarize_parameter all send Bearer sk-test without mocking user_api_key_auth. When a prior test in the same xdist worker sets master_key, the auth check fails for sk-test and the test fails intermittently. Fix: use app.dependency_overrides[ps.user_api_key_auth] to bypass auth, same pattern as other tests in the same file. * fix(tests): mock user_api_key_auth in test_vertex_passthrough_with_no_default_credentials vertex_proxy_route calls user_api_key_auth internally. When a prior test in the same xdist worker sets master_key, the auth check fails for the test request and create_pass_through_route is never called, causing assert_called_once_with to fail. Fix: patch user_api_key_auth as an AsyncMock in the with mock.patch() block.