mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-14 22:21:29 +00:00
53e2516ace
- Remove network dependency by mocking HuggingFace template fetch - Use mock template that produces correct format for test validation - Test now focuses on transformation logic, not network calls - Fixes flaky test failures due to network timeouts/rate limits The test verifies that prompt transformation occurs (not simple concatenation), which doesn't require the actual HuggingFace template. Mocking makes the test deterministic and faster while still validating the core behavior.
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