litellm/tests/test_litellm/proxy/client/cli
ryan-crabbe-berri e9d40a8f73 test: enforce F811 so a duplicate definition cannot silently replace the first
A name bound twice keeps only the second binding. In `tests/` that is nearly
always a repeated import, harmless but misleading, and the same rule is what
catches the cases that are not harmless: a local that shadows an import the
module still calls, and a second `def test_x` that quietly replaces the first.

311 of the 344 sites were repeated imports and came out with ruff's own fix.
The remaining 33 needed a decision. Four modules imported a name they never
used because a local definition below already shadowed it. Two comprehensions
bound `call` over `unittest.mock.call`, which those modules import and use.
One test rebound the two module handles its nested reload closure had captured.
One class attribute shadowed an unused `status` import.

The load-test fixtures move to a conftest, which is how pytest is meant to share
them, so the test module no longer imports three fixture names it never calls.
The nine `prisma_client` parameters keep a narrow `noqa`: pytest resolves that
fixture by name before the body runs, so the parameter never shadows anything.
2026-08-21 12:06:19 -07:00
..
autoroute fix(autoroute): discover models via /v1/models so an AI-API-only key works (#34259) 2026-07-22 20:50:14 -07:00
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_agents.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_auth_commands.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_claude_settings.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_config_commands.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_credentials_commands.py test fix creds test 2025-07-03 22:01:52 -07:00
test_encryption_commands.py feat(proxy): add AES-256-GCM at-rest credential encryption with versioned format and re-encryption migration (#31215) 2026-06-29 20:14:22 +02:00
test_global_options.py test(cli): use example.com placeholder host in base-url trailing slash test (#37240) 2026-08-18 00:52:10 +00:00
test_keys_commands.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
test_model_groups_commands.py feat(cli): add lite up/down to ambiently route Claude Code through the proxy (#33231) 2026-07-15 21:46:02 -07:00
test_models_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00
test_pkce_login.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_up_commands.py Merge origin/litellm_internal_staging into litellm_cli_refresh_tokens 2026-08-20 10:54:48 -07:00
test_users_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00