mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-29 16:22:08 +00:00
* Fix - add safe divide by 0 for most places to prevent crash * Enhance MCPRequestHandler to support permission inheritance and intersection logic for access groups. Added integration tests to verify behavior when keys have no permissions and when both keys and teams have overlapping permissions. * Remove redundant assertions for permission checks in test_user_api_key_auth_mcp.py to streamline test logic. * Refactor integration tests for MCPRequestHandler to simplify mocking. Replace complex database mocks with direct function mocks for permission inheritance and intersection scenarios, improving test clarity and maintainability. * Revert "Fix - add safe divide by 0 for most places to prevent crash" This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
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