litellm/tests
Alexsander Hamir 699a91e031
fix(test): Fix test_users_in_team_budget to create user with team_id (#18297)
Previously, the test created a user first (without team_id), then added them
to a team. This caused the API key to have team_id=None, which broke team
budget tracking and enforcement.

The fix:
- Create team first, then create user with team_id parameter
- This ensures the API key gets team_id set from creation time
- Team budget tracking and enforcement now work correctly

Added comprehensive comments explaining why the order is critical and should
not be changed, as it tests the intended flow where keys are associated with
teams at creation time.

Also added extensive debugging output to help diagnose future issues.
2025-12-20 12:30:30 -08:00
..
agent_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
audio_tests test_runwayml_tts_async 2025-12-13 16:10:48 -08:00
basic_proxy_startup_tests Fix: remove merge markdown (#17586) 2025-12-06 05:38:16 -08:00
batches_tests Add output file id in managed objects for batches 2025-12-16 15:52:07 +05:30
code_coverage_tests code qa check 2025-12-19 19:00:44 +05:30
documentation_tests
enterprise added extraction of top level metadata for custom lables in prometheus callbacks (#18087) 2025-12-17 11:17:12 +05:30
guardrails_tests [Feat] Guardrails Load Balancing - Allow Platform admins to load balance between guardrails (#18181) 2025-12-19 00:08:03 +05:30
image_gen_tests test_amazon_titan_image_gen 2025-12-20 15:16:55 +05:30
litellm Merge branch 'main' into litellm_staging_12_16_2025 2025-12-16 21:38:14 +05:30
litellm_utils_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
litellm-proxy-extras Fix: Distinguish permission errors from idempotent errors in Prisma migrations (#17064) 2025-11-24 20:41:44 -08:00
llm_responses_api_testing [Fix] CI/CD - responses_api_testing (#18295) 2025-12-20 10:27:58 -08:00
llm_translation TestAzureOpenAIO3Mini 2025-12-20 23:18:19 +05:30
load_tests
local_testing test compl openai orgs 2025-12-20 23:41:29 +05:30
logging_callback_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
mcp_tests feat: add support for using MCPs on /chat/completions 2025-12-10 10:55:33 +09:00
multi_instance_e2e_tests
ocr_tests vertex ai deepseek doesn't support pdf urls, so skip them 2025-12-19 23:53:17 +05:30
old_proxy_tests/tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
openai_endpoints_tests test_e2e_batches_files 2025-11-27 09:14:43 -08:00
otel_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
pass_through_tests
pass_through_unit_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
proxy_admin_ui_tests Merge remote-tracking branch 'origin' into litellm_new_user_collision_handling 2025-12-06 19:58:35 -08:00
proxy_security_tests
proxy_unit_tests Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
router_unit_tests fix(router): add minimum request threshold for error rate cooldown (#17464) 2025-12-12 04:36:10 -08:00
scim_tests
search_tests [Feat] New Search API Provider - LinkUp Search (#18174) 2025-12-18 14:27:36 +05:30
spend_tracking_tests
store_model_in_db_tests test_edit_mcp_server_redacts_credentials 2025-11-26 11:54:11 -08:00
test_litellm Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
unified_google_tests
vector_store_tests [Feat] Add new Rag Search API / Query API with rerankers (#18217) 2025-12-19 19:05:07 +05:30
windows_tests
__init__.py
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_budget_management.py
test_callbacks_on_proxy.py Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
test_config.py
test_debug_warning.py
test_end_users.py
test_entrypoint.py
test_fallbacks.py
test_gpt5_azure_temperature_support.py
test_health.py
test_keys.py
test_litellm_proxy_responses_config.py
test_logging.conf
test_models.py
test_openai_endpoints.py
test_organizations.py
test_passthrough_endpoints.py
test_ratelimit.py
test_resource_cleanup.py
test_spend_logs.py Revert "[Fix] Security - Remove example API keys with high entropy (#18255)" 2025-12-20 20:48:11 +05:30
test_team_logging.py
test_team_members.py
test_team.py fix(test): Fix test_users_in_team_budget to create user with team_id (#18297) 2025-12-20 12:30:30 -08:00
test_users.py

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/test_litellm

This folder can only run mock tests.