mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 08:17:51 +00:00
Reapplies the fix from commita885e21543that was reverted in6c9556be67. The original revert was done because the test was flaky and giving false negatives. This fix properly mocks the Langfuse client to ensure the test can correctly verify that _log_langfuse_v2 converts None usage values to 0. Changes: - Add mock_langfuse_client.client attribute to prevent errors during init - Add trace_id to mock_langfuse_generation for proper return value handling - Remove redundant mock setup code - Explicitly set logger.Langfuse to mock client after initialization - Set logger.langfuse_sdk_version to ensure _supports_* methods work correctly
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.