mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-02 14:22:16 +00:00
* fix(tests): Fix sendgrid email tests to properly mock httpx client The tests were potentially hitting the real SendGrid API because the mock was patching get_async_httpx_client() but the actual client could be cached or the mock timing could be off. Fix by directly replacing logger.async_httpx_client after instantiation, which guarantees the mock is used regardless of caching or initialization timing issues. Changes: - Replace mock_httpx_client fixture with simpler mock_async_client fixture - Directly inject mock client into logger instance after creation - Remove respx decorator (no longer needed with direct injection) - Simplify test structure while maintaining same assertions * fix(lint): remove unused imports from SendGrid test