litellm/tests
Cole McIntosh abe364c2bc
Fix: Ensure exception is not None before checking its string representation (#12209)
The test_keys_delete_error_handling test was failing with:
- ConnectionError when the mock wasn't properly applied
- The test was checking str(result.exception) without first verifying exception exists

This fix adds an explicit check that result.exception is not None before
attempting to convert it to string, preventing potential AttributeError
and making the test more robust.
2025-07-01 12:30:31 -07:00
..
basic_proxy_startup_tests
batches_tests Store batch output file id in DB + Store batch file status in DB + (experimental) BATCH API COST TRACKING 2025-06-25 22:41:22 -07:00
code_coverage_tests [️ Python SDK import] - reduce python sdk import time by .3s (#12140) 2025-06-28 14:57:10 -07:00
documentation_tests
enterprise Store batch output file id in DB + Store batch file status in DB + (experimental) BATCH API COST TRACKING 2025-06-25 22:41:22 -07:00
guardrails_tests Adding Feature: Palo Alto Networks Prisma AIRS Guardrail (#12116) 2025-06-27 15:17:36 -07:00
image_gen_tests [Fix]: Add cost tracking for image edits endpoint [OpenAI, Azure] (#11186) 2025-05-27 17:52:15 -07:00
litellm_utils_tests fix: support Cursor IDE tool_choice format {"type": "auto"} (#12168) 2025-06-30 12:39:58 -07:00
litellm-proxy-extras Prisma Migrate - support setting custom migration dir (#10336) 2025-04-26 12:05:06 -07:00
llm_responses_api_testing [Feat] Add Azure Codex Models on LiteLLM + new /v1 preview Azure OpenAI API (#11934) 2025-06-20 18:08:44 -07:00
llm_translation Fix - handle empty config.yaml + Fix gemini /models - replace models/ as expected, instead of using 'strip' (#12189) 2025-06-30 21:56:03 -07:00
load_tests test: test_embedding_performance 2025-05-14 21:31:07 -07:00
local_testing test whitelisted models 2025-06-28 14:46:16 -07:00
logging_callback_tests [Feat] Add new AWS SQS Logging Integration (#12176) 2025-06-30 14:02:49 -07:00
mcp_tests [Feat] MCP - Allow connecting to MCP with authentication headers + Allow clients to specify MCP headers (#11890) (#11891) 2025-06-19 20:07:08 -07:00
multi_instance_e2e_tests
old_proxy_tests/tests test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
openai_endpoints_tests set flaky tests as flaky 2025-06-14 13:51:52 -07:00
otel_tests set flaky tests as flaky 2025-06-14 13:51:52 -07:00
pass_through_tests add jest.retryTimes(3); 2025-06-27 21:31:51 -07:00
pass_through_unit_tests test fix - test_anthropic_messages_passthrough.py 2025-06-30 21:56:31 -07:00
proxy_admin_ui_tests [️ Python SDK import] - reduce python sdk import time by .3s (#12140) 2025-06-28 14:57:10 -07:00
proxy_security_tests
proxy_unit_tests [️ Python SDK import] - reduce python sdk import time by .3s (#12140) 2025-06-28 14:57:10 -07:00
router_unit_tests test_mock_router_testing_params_str_to_bool_conversion 2025-06-27 18:07:33 -07:00
scim_tests [Feat SSO] Add LiteLLM SCIM Integration for Team and User management (#10072) 2025-04-16 19:21:47 -07:00
spend_tracking_tests
store_model_in_db_tests fix test MCP 2025-06-20 12:09:45 -07:00
test_litellm Fix: Ensure exception is not None before checking its string representation (#12209) 2025-07-01 12:30:31 -07:00
unified_google_tests [Feat] gemini-cli integration - Add Logging + Cost tracking for stream + non-stream Vertex / Google AI Studio routes (#12058) 2025-06-25 22:26:20 -07:00
vector_store_tests [Feat] OpenAI/Azure OpenAI - Add support for creating vector stores on LiteLLM (#12021) 2025-06-24 20:46:48 -07:00
windows_tests [Bug Fix] UnicodeDecodeError: 'charmap' on Windows during litellm import (#10542) 2025-05-03 21:31:05 -07:00
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_budget_management.py Update enduser spend and budget reset date based on budget duration (#8460) 2025-06-08 08:39:14 -07:00
test_callbacks_on_proxy.py
test_config.py
test_debug_warning.py
test_end_users.py
test_entrypoint.py
test_fallbacks.py Ollama Chat - parse tool calls on streaming (#11171) 2025-05-27 16:14:49 -07:00
test_health.py
test_keys.py test: temporarily skip test due to change testing model change - need to update test for new model 2025-05-09 09:02:08 -07:00
test_logging.conf
test_models.py Add model access groups on UI (#11719) 2025-06-13 21:20:25 -07:00
test_openai_endpoints.py
test_organizations.py UI - fix adding vertex models with reusable credentials + fix pagination on keys table + fix showing org budgets on table (#10528) 2025-05-03 08:16:53 -07:00
test_passthrough_endpoints.py
test_ratelimit.py
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py build: publish new litellm-proxy-extras file 2025-05-27 17:44:23 -07:00
test_users.py test: fix imports 2025-05-26 22:06:53 -07:00

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.