litellm/tests/test_litellm/proxy/common_utils
ryan-crabbe-berri b76def0e5d
test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769)
`pytest.raises(Exception)` with no `match=` passes on any error that broad. A
TypeError from a refactor, a botched fixture, an import that moved: all of them
read as the rejection the test claims to police, so the test goes green for the
wrong reason and stays green after the behaviour it guards is gone.

PT011 closes that gap for the 317 sites B017 could not reach, because B017 only
fires on a single-statement body with no `as e` binding. Each pattern here is the
message the code actually raised, recorded by running the sites under a plugin
that logged the concrete type and text per call site, so the assertions describe
observed behaviour rather than a guess. Where a site raises more than one message
across its parametrize cases, the pattern is an alternation of what was seen;
where the exception carries an empty `str()` and puts the text on `.message`, the
site keeps a narrow `noqa` with the reason.

PT014 removes four parametrize cases that were listed twice. The duplicate re-runs
an assertion that already passed, and it usually marks a case someone meant to
vary and forgot to edit.
2026-08-20 20:24:49 -07:00
..
html_forms feat(proxy): native CLI login with OAuth authorization code + PKCE 2026-08-20 04:10:10 -07:00
test_auth_cache_invalidation_pubsub.py fix(proxy): invalidate cached project object on project update and delete (#36028) 2026-08-07 15:19:00 +00:00
test_cache_codec.py fix(proxy): stop CacheCodec dropping null fields on cache round-trip (#32207) 2026-07-06 12:53:00 -07:00
test_callback_utils.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_config_sync_pubsub.py fix(proxy): persist periodic reload schedule state so status survives restarts and fires without store_model_in_db (#35165) 2026-08-04 15:42:57 -07:00
test_custom_openapi_spec.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_encrypt_decrypt_utils.py fix(proxy): stop the decrypt-failure debug log from leaking the raw value 2026-07-03 13:03:45 -07:00
test_expired_ui_session_key_cleanup_manager.py Handle cleanup delete races and accurate counts 2026-04-25 03:01:34 +03:00
test_get_routes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_http_parsing_utils.py perf(proxy): bound event-loop blocking from oversized requests (#31497) 2026-06-27 12:06:48 -07:00
test_json_merge_patch.py fix(team): bound json merge patch recursion depth 2026-07-11 09:36:15 -07:00
test_key_rotation_e2e.py Litellm key rotation bug (#27756) 2026-05-12 17:16:37 -07:00
test_key_rotation_integration.py feat(proxy)!: default audit logs on for enterprise licenses (#37518) 2026-08-19 18:49:21 -07:00
test_key_rotation_lock.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
test_key_rotation_manager.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_load_config_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_model_deprecation.py fix(proxy): escape slack markup in model deprecation alert fields 2026-08-13 02:39:34 +00:00
test_openai_endpoint_utils.py fix(vector-stores): recurse into nested litellm_params; handle JSON-string shape 2026-04-29 18:56:40 +00:00
test_path_utils.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_periodic_reload_schedule.py fix(proxy): persist periodic reload schedule state so status survives restarts and fires without store_model_in_db (#35165) 2026-08-04 15:42:57 -07:00
test_rbac_utils.py test: run the 30 test files stranded in the second mirror (#37595) 2026-08-20 10:59:43 -07:00
test_registry_read_through.py fix: gate guardrail read-through to active rows and serialize it with the reload reconcile 2026-08-19 01:46:33 -07:00
test_reset_budget_job.py perf(reset_budget_job): elect one sweeper per tick and bound the window scan (#36497) 2026-08-20 17:29:07 -07:00
test_scheduled_job_stagger.py perf(proxy): stagger scheduled background jobs across jobs and pods (#36589) 2026-08-12 09:17:31 -07:00
test_sse_keepalive.py fix(proxy): send SSE keepalives while a slow upstream is still silent (#37322) 2026-08-18 14:43:01 -07:00
test_static_asset_utils.py fix(static-assets): browser-load remote branding assets 2026-04-30 11:30:57 -07:00
test_timezone_utils.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_upsert_budget_membership.py feat(ui): add budget duration to edit team member form (#29717) 2026-06-06 17:24:55 -07:00
test_user_api_key_cache.py fix(proxy/auth): honor user_api_key_cache_ttl for management-object cache writes (#31504) 2026-06-27 12:19:28 -07:00