litellm/tests/test_litellm/proxy/auth
yuneng-jiang 1755a281bd Fix mutation bug: copy lists in get_key_models to prevent corrupting cached UserAPIKeyAuth
`all_models = user_api_key_dict.models` was creating an alias, so
`_get_models_from_access_groups` (which uses `.pop()`/`.extend()`) would
mutate the cached object in-place. Now both `.models` and `.team_models`
assignments create copies via `list()`.

Added test to verify the input is not mutated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 22:55:53 -07:00
..
test_auth_checks.py feat(proxy): include user_email in jwt upsert user creation (#22915) 2026-03-05 10:55:11 -08:00
test_auth_exception_handler.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_auth_hot_path_network_requests.py fix: update docker test file to right path 2026-02-19 18:44:28 +05:30
test_auth_utils.py fix(proxy): support slashes in google generateContent model names (#19737) 2026-01-25 22:59:50 -08:00
test_cli_auth.py Fix team cli auth flow (#19666) 2026-01-28 08:52:52 -08:00
test_custom_auth_end_user_budget.py fix(proxy): make common_checks opt-in for custom auth via custom_auth_run_common_checks 2026-03-03 22:50:34 +05:30
test_handle_jwt.py fix: apply same AsyncMock pattern to remaining OIDC discovery test 2026-03-03 19:56:51 -03:00
test_info_routes.py [Feat[ extends OAuth2 M2M authentication support to info routes (/key/info, /team/info, /user/info, /model/info) (#22713) 2026-03-06 17:29:25 -08:00
test_litellm_license.py Show remaining users on UI (#11568) 2025-06-09 22:04:45 -07:00
test_login_utils.py remove key blocking 2026-01-31 16:46:17 -08:00
test_mcp_ip_filtering.py Return Clear error message why no tools are available / IP Filtering occured 2026-02-26 09:56:44 +05:30
test_model_checks.py Fix mutation bug: copy lists in get_key_models to prevent corrupting cached UserAPIKeyAuth 2026-03-09 22:55:53 -07:00
test_model_checks_fallbacks.py feat: extended /v1/models endpoint, now it returns with fallbacks on demand (#12811) 2025-07-22 23:16:46 -07:00
test_object_permission_loading.py Fix:test_get_key_object_loads_object_permission 2026-02-18 19:18:15 +05:30
test_onboarding.py fix(onboarding): prevent invite link reuse for password reset 2026-02-28 17:39:03 -08:00
test_organization_budget_enforcement.py Fix/organization max budget not enforced (#17334) 2025-12-02 22:46:03 -08:00
test_route_checks.py fix: org admin invite user — multi-org selector, organizations list in POST body, auth check 2026-03-07 20:34:12 -08:00
test_team_member_budget.py 3[Fix] CI/CD - logging_testing (#18204) 2025-12-18 10:52:24 -08:00
test_user_api_key_auth.py feat: allow JWT and OAuth2 auth to coexist on the same instance (#23153) 2026-03-09 08:41:27 -07:00