mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
TestPriceDataReloadAPI, TestPriceDataReloadIntegration and TestInvitationEndpoints set app.dependency_overrides[user_api_key_auth] and never removed it. Under xdist the shared proxy app kept the override, disabling auth for later tests on the same worker and failing test_harness_smoke.py::test_auth_as_cleans_up_on_exit. Set it through monkeypatch.setitem so it is undone at teardown A per-test leak check over every tests/test_litellm/proxy file that touches dependency_overrides found these 20 tests as the only leakers; it reports none after this change |
||
|---|---|---|
| .. | ||
| integrations/clickhouse | ||
| proxy | ||
| tracing | ||
| __init__.py | ||
| conftest.py | ||
| readme.md | ||
| test_check_unbounded_in_lists.py | ||
| test_conftest.py | ||
Testing for litellm/
This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.
The point of this is to:
- Increase test coverage of
litellm/ - Make it easy for contributors to add tests for the
litellm/package and easily run tests without needing LLM API keys.
File name conventions
litellm/proxy/test_caching_routes.pymaps tolitellm/proxy/caching_routes.pytest_<filename>.pymaps tolitellm/<filename>.py