From 6771e8dffc28185c33f7ac616f2a64f7b5606177 Mon Sep 17 00:00:00 2001 From: shivam Date: Fri, 4 Sep 2026 23:01:08 +0000 Subject: [PATCH] test(jwt): document intentional internal patches Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/test_litellm/proxy/auth/test_handle_jwt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/auth/test_handle_jwt.py b/tests/test_litellm/proxy/auth/test_handle_jwt.py index 28a7d53bac7..d1c9b706f9b 100644 --- a/tests/test_litellm/proxy/auth/test_handle_jwt.py +++ b/tests/test_litellm/proxy/auth/test_handle_jwt.py @@ -128,12 +128,14 @@ async def test_map_user_to_teams_swallows_non_auth_failures(side_effect): user = LiteLLM_UserTable(user_id="test_user_1") team = LiteLLM_TeamTable(team_id="test_team_1", members_with_roles=[]) - with patch( + with patch( # test-quality-ok: map_user_to_teams imports team_member_add locally "litellm.proxy.management_endpoints.team_endpoints.team_member_add", new_callable=AsyncMock, side_effect=side_effect, ) as mock_add: - with patch("litellm.proxy.auth.handle_jwt.verbose_proxy_logger") as mock_logger: + with patch( # test-quality-ok: assert the warning emitted for swallowed failures + "litellm.proxy.auth.handle_jwt.verbose_proxy_logger" + ) as mock_logger: result = await JWTAuthManager.map_user_to_teams(user_object=user, team_object=team) assert result is None