litellm/tests/test_litellm/proxy
Julio Quinteros Pro 30d4f344ae fix(tests): restore proxy_server module attrs in test_proxy_admin_expired_key_from_cache
The test was using setattr() to set module-level attributes (including
proxy_logging_obj = MagicMock()) on the real litellm.proxy.proxy_server
module, but the finally block only had `pass` — no cleanup.

This left proxy_logging_obj as a MagicMock in subsequent tests running
in the same pytest-xdist worker, causing TypeError when log_db_metrics
decorator called asyncio.create_task(proxy_logging_obj.service_logging_obj
.async_service_success_hook(...)) — a MagicMock is not a coroutine.

Fix: save original attribute values before the test and restore them in
the finally block to ensure test isolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 09:33:11 -03:00
..
_experimental/mcp_server Revert "End users - Allow giving end users access to specific mcp servers (#…" (#21461) 2026-02-17 22:49:57 -08:00
agent_endpoints tests 2026-02-13 22:01:28 -08:00
anthropic_endpoints [Fix] 404 Not Found on /api/event_logging/batch endpoint (#20504) 2026-02-05 10:58:08 -08:00
auth fix(tests): restore proxy_server module attrs in test_proxy_admin_expired_key_from_cache 2026-02-18 09:33:11 -03:00
client
common_utils fix(proxy): fix master key rotation Prisma validation errors (#21330) 2026-02-16 15:13:05 -08:00
db Revert "fix(pod-lock): make release lock compare-and-delete atomic (#21226)" 2026-02-18 17:24:34 +05:30
discovery_endpoints fix(azure): preserve content_policy_violation error details from Azure OpenAI (#20883) 2026-02-10 22:47:03 -08:00
experimental/mcp_server
google_endpoints
guardrails Merge pull request #21326 from BerriAI/litellm_oss_staging_02_16_2026 2026-02-18 17:47:57 +05:30
health_endpoints Fix health endpoints 2026-01-31 12:25:04 -08:00
hooks fix(proxy): fix master key rotation Prisma validation errors (#21330) 2026-02-16 15:13:05 -08:00
image_endpoints fixing core proxy tests 2026-02-12 17:54:32 -08:00
management_endpoints Merge pull request #21326 from BerriAI/litellm_oss_staging_02_16_2026 2026-02-18 17:47:57 +05:30
management_helpers
middleware
openai_files_endpoint
pass_through_endpoints fix: add custom_body parameter to endpoint_func in create_pass_through_route (#20849) 2026-02-13 16:44:40 -08:00
policy_engine [Guardrails] Add guardrail pipeline support for conditional sequential execution (#21177) 2026-02-13 19:49:12 -08:00
prompts
public_endpoints
response_api_endpoints
spend_tracking fixes - showing content filter on failure 2026-02-17 17:57:52 -08:00
test_configs
ui_crud_endpoints
vector_store_endpoints test_delete_vector_store_checks_access 2026-01-31 12:05:09 -08:00
__init__.py
conftest.py
test_api_key_masking_in_errors.py fix: mask API keys in error responses for invalid/malformed keys (#20289) 2026-02-12 19:58:05 +05:30
test_batch_metadata_none_fix.py
test_caching_routes.py
test_chat_completion_metadata.py
test_common_request_processing.py use cached keys and teams for router settings 2026-02-06 15:07:29 -08:00
test_custom_proxy.py
test_empty_model_list.py
test_enforce_user_param.py
test_fallback_management_endpoints.py
test_fastapi_offline_routes.py
test_health_check_functions.py
test_litellm_pre_call_utils.py Fix test_embedding_header_forwarding_with_model_group for parallel test execution 2026-02-15 13:08:41 -03:00
test_model_id_header_propagation.py
test_proxy_cli.py fix: add missing OpenAI chat completion params to OPENAI_CHAT_COMPLETION_PARAMS (#21360) 2026-02-16 20:31:21 -08:00
test_proxy_server.py fix: address Greptile review feedback for test isolation 2026-02-17 21:28:23 -03:00
test_proxy_types.py
test_proxy_utils.py
test_pyroscope.py Fix CI/CD pyroscope test failure (#21219) 2026-02-14 12:07:20 -08:00
test_response_model_sanitization.py
test_route_a2a_models.py Fix test_route_a2a_model_bypasses_router 2026-02-05 09:47:05 +05:30
test_route_llm_request.py Override router settings 2026-01-31 16:04:52 -08:00
test_shared_health_check.py
test_spend_log_cleanup.py
test_swagger_chat_completions.py
test_team_member_update.py