litellm/tests/test_litellm/proxy/auth
Parinith 5e255ae8f3 test(proxy/auth): add regression test for max_budget enforcement after spend reset (#27300)
Adds `test_max_budget_enforced_after_spend_reset` to verify that
`_virtual_key_max_budget_check` correctly blocks requests after
post-reset spend re-accumulates past `max_budget`.

Covers the full lifecycle:
1. Pre-reset: exhausted key (spend == max_budget) is blocked.
2. Budget reset zeroes `valid_token.spend` and the spend counter.
3. First post-reset request is allowed (counter reads 0).
4. Post-reset spend accumulates past `max_budget` — blocked again.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 00:35:58 +05:30
..
test_admin_viewer_handler_access.py fix(rbac): restore admin-viewer read parity for Logs page + settings reads 2026-04-29 19:21:41 -07:00
test_auth_checks.py test(proxy/auth): add regression test for max_budget enforcement after spend reset (#27300) 2026-05-11 00:35:58 +05:30
test_auth_exception_handler.py Fix proxy auth status code tests (#27555) 2026-05-09 14:47:48 -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): include request-blocked callback params in auth bans 2026-05-04 16:54:04 -07:00
test_cli_auth.py cover cli sso start validation 2026-04-29 17:25:32 -07:00
test_custom_auth_end_user_budget.py fix(auth): centralize common_checks to close authorization bypass 2026-04-23 00:04:42 +00:00
test_handle_jwt.py Merge pull request #27008 from stuxf/fix/jwt-audience-and-issuer-verification 2026-05-01 19:58:52 -07:00
test_info_routes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_litellm_license.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_login_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07: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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_model_checks_fallbacks.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_multi_budget_windows.py feat: multiple concurrent budget windows per API key and team (#24883) (#25109) 2026-04-06 14:02:04 -07:00
test_oauth2_proxy_hook.py chore(auth): require trusted proxy for header identity auth 2026-04-29 21:20:21 -07:00
test_object_permission_loading.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_onboarding.py chore(auth): address onboarding review follow-ups 2026-04-29 19:10:30 -07:00
test_organization_budget_enforcement.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_password_hashing.py chore: fixes 2026-03-30 18:36:58 -07:00
test_route_checks.py Allow team admins to test model connections (#27487) 2026-05-08 15:30:41 -07:00
test_router_override_fallback_auth.py [Fix] Proxy: Repair Merge Fallout In Router-Override Fallback Auth 2026-05-01 17:48:51 -07:00
test_team_member_budget.py Fix team member budget enforcement without user row (#27273) 2026-05-06 11:42:29 -07:00
test_unmapped_model_budget_enforcement.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_user_api_key_auth.py Fix proxy auth status code tests (#27555) 2026-05-09 14:47:48 -07:00