The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(proxy): move auth, hooks, policy_engine and client tests into tests/unit/proxy (#43998)
devin-ai-integration[bot]39e31958f895
diff --git a/.github/merge-smoke-tests.json b/.github/merge-smoke-tests.jsonindex 727733fa954..90d3b6a6d59 100644--- a/.github/merge-smoke-tests.json+++ b/.github/merge-smoke-tests.json@@ -3,8 +3,8 @@"CHAT-JSON": "tests/unit/llms/openai/test_openai.py::test_acompletion_returns_json_reply_over_injected_transport","CHAT-TEXT-STREAM": "tests/unit/llms/openai/test_openai.py::test_acompletion_streams_text_deltas_over_injected_transport","CHAT-TOOL-STREAM": "tests/unit/llms/openai/test_openai.py::test_acompletion_streams_tool_call_arguments_over_injected_transport",- "MODEL-ALLOW": "tests/test_litellm/proxy/auth/test_auth_checks.py::test_can_object_call_model_allows_listed_model_for_key",- "MODEL-DENY": "tests/test_litellm/proxy/auth/test_auth_checks.py::test_can_object_call_model_denials_return_forbidden[key-key_model_access_denied]",+ "MODEL-ALLOW": "tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py::test_can_object_call_model_allows_listed_model_for_key",+ "MODEL-DENY": "tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.py::test_can_object_call_model_denials_return_forbidden[key-key_model_access_denied]","COST-EXPLICIT": "tests/unit/test_cost_calculator.py::test_completion_cost_charges_explicit_per_token_rates_over_registered_ones","COST-ZERO": "tests/unit/test_cost_calculator.py::test_completion_cost_is_zero_when_explicit_rates_are_zero","LOG-CONTENT-ON": "tests/unit/litellm_core_utils/test_litellm_logging.py::test_standard_logging_payload_keeps_message_content_when_message_logging_is_on",diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.ymlindex d3604a81e8f..3964db706f8 100644--- a/.github/workflows/test-unit.yml+++ b/.github/workflows/test-unit.yml@@ -119,10 +119,19 @@ jobs:- shard: proxy-authartifact-name: proxy-authtest-path: >-- tests/test_litellm/proxy/auth- tests/test_litellm/proxy/hooks- tests/test_litellm/proxy/policy_engine- tests/test_litellm/proxy/client+ tests/unit/proxy/auth+ tests/unit/proxy/hooks+ tests/unit/proxy/policy_engine+ tests/unit/proxy/client+ --ignore=tests/unit/proxy/auth/test_auth_checks.py+ --ignore=tests/unit/proxy/auth/test_user_api_key_auth.py+ --ignore=tests/unit/proxy/auth/test_default_end_user_budget_simple.py+ --ignore=tests/unit/proxy/auth/test_jwt.py+ --ignore=tests/unit/proxy/auth/test_models_fallback_endpoint.py+ --ignore=tests/unit/proxy/auth/test_multipart_bypass_repro.py+ --ignore=tests/unit/proxy/auth/test_proxy_routes.py+ --ignore=tests/unit/proxy/hooks/test_banned_keyword_list.py+ --ignore=tests/unit/proxy/hooks/test_unit_test_max_model_budget_limiter.pyworkers: 2reruns: 2timeout-minutes: 20@@ -190,6 +199,8 @@ jobs:tests/test_litellm/proxy/types_utilstests/test_litellm/proxy/logging_endpointstests/test_litellm/proxy/test_*.py+ tests/unit/proxy/test_proxy_server_endpoints_and_startup.py+ tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.pyunit-flag: proxy-infraworkers: 4reruns: 2diff --git a/Makefile b/Makefileindex cad3242fbce..704c587fd47 100644--- a/Makefile+++ b/Makefile@@ -324,10 +324,10 @@ test-unit-proxy-guardrails: install-test-deps$(UV_RUN) pytest tests/test_litellm/proxy/guardrails tests/test_litellm/proxy/management_endpoints tests/test_litellm/proxy/management_helpers --tb=short -vv -n 4 --durations=20test-unit-proxy-core: install-test-deps- $(UV_RUN) pytest tests/test_litellm/proxy/auth tests/test_litellm/proxy/client tests/test_litellm/proxy/db tests/test_litellm/proxy/hooks tests/test_litellm/proxy/policy_engine --tb=short -vv -n 4 --durations=20+ $(UV_RUN) pytest tests/unit/proxy/auth tests/unit/proxy/client tests/test_litellm/proxy/db tests/unit/proxy/hooks tests/unit/proxy/policy_engine --tb=short -vv -n 4 --durations=20test-unit-proxy-misc: install-test-deps- $(UV_RUN) pytest tests/test_litellm/proxy/_experimental tests/test_litellm/proxy/agent_endpoints tests/test_litellm/proxy/anthropic_endpoints tests/test_litellm/proxy/common_utils tests/test_litellm/proxy/discovery_endpoints tests/test_litellm/proxy/experimental tests/test_litellm/proxy/google_endpoints tests/test_litellm/proxy/health_endpoints tests/test_litellm/proxy/image_endpoints tests/test_litellm/proxy/middleware tests/test_litellm/proxy/openai_files_endpoint tests/test_litellm/proxy/pass_through_endpoints tests/test_litellm/proxy/prompts tests/test_litellm/proxy/public_endpoints tests/test_litellm/proxy/response_api_endpoints tests/test_litellm/proxy/shutdown tests/test_litellm/proxy/spend_tracking tests/test_litellm/proxy/ui_crud_endpoints tests/test_litellm/proxy/vector_store_endpoints tests/test_litellm/proxy/test_*.py --tb=short -vv -n 4 --durations=20+ $(UV_RUN) pytest tests/test_litellm/proxy/_experimental tests/test_litellm/proxy/agent_endpoints tests/test_litellm/proxy/anthropic_endpoints tests/test_litellm/proxy/common_utils tests/test_litellm/proxy/discovery_endpoints tests/test_litellm/proxy/experimental tests/test_litellm/proxy/google_endpoints tests/test_litellm/proxy/health_endpoints tests/test_litellm/proxy/image_endpoints tests/test_litellm/proxy/middleware tests/test_litellm/proxy/openai_files_endpoint tests/test_litellm/proxy/pass_through_endpoints tests/test_litellm/proxy/prompts tests/test_litellm/proxy/public_endpoints tests/test_litellm/proxy/response_api_endpoints tests/test_litellm/proxy/shutdown tests/test_litellm/proxy/spend_tracking tests/test_litellm/proxy/ui_crud_endpoints tests/test_litellm/proxy/vector_store_endpoints tests/test_litellm/proxy/test_*.py tests/unit/proxy/test_proxy_server_endpoints_and_startup.py tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py tests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.py --tb=short -vv -n 4 --durations=20test-unit-integrations: install-test-deps$(UV_RUN) pytest tests/unit/integrations --tb=short -vv -n 4 --durations=20diff --git a/tests/proxy_behavior/auth/test_auth_object_prefetch.py b/tests/proxy_behavior/auth/test_auth_object_prefetch.pyindex cfa958500af..2d3b6da2a45 100644--- a/tests/proxy_behavior/auth/test_auth_object_prefetch.py+++ b/tests/proxy_behavior/auth/test_auth_object_prefetch.py@@ -1,6 +1,6 @@"""Runs the auth prefetch's raw SQL against a real Postgres: the join must bind the membership to the requestedteam and hand the getters rows they validate. The per-regime round-trip counts are unit-tested with fakes in-tests/test_litellm/proxy/auth/test_auth_object_prefetch.py."""+tests/unit/proxy/auth/test_auth_object_prefetch.py."""import jsonfrom unittest.mock import AsyncMock, MagicMockdiff --git a/tests/unit/proxy/_experimental/mcp_server/conftest.py b/tests/unit/proxy/_experimental/mcp_server/conftest.pyindex d8b91e07467..51cab559797 100644--- a/tests/unit/proxy/_experimental/mcp_server/conftest.py+++ b/tests/unit/proxy/_experimental/mcp_server/conftest.py@@ -1,5 +1,6 @@import asyncioimport importlib+import osimport pytest@@ -76,3 +77,62 @@ def config_only_mcp_manager_factory():return Nonereturn ConfigOnlyManager++[email protected](autouse=True)+def _hermetic_mcp_server_registry():+ from litellm.proxy._experimental.mcp_server.mcp_server_manager import (+ global_mcp_server_manager,+ )++ saved_registry = dict(global_mcp_server_manager.registry)+ saved_config_servers = dict(global_mcp_server_manager.config_mcp_servers)+ saved_tool_mapping = dict(global_mcp_server_manager.tool_name_to_mcp_server_name_mapping)+ saved_oauth_slots = global_mcp_server_manager._oauth_discovery_slots+ global_mcp_server_manager.registry.clear()+ global_mcp_server_manager.config_mcp_servers.clear()+ global_mcp_server_manager.tool_name_to_mcp_server_name_mapping.clear()+ global_mcp_server_manager._oauth_discovery_slots = ()+ try:+ yield+ finally:+ global_mcp_server_manager.registry.clear()+ global_mcp_server_manager.registry.update(saved_registry)+ global_mcp_server_manager.config_mcp_servers.clear()+ global_mcp_server_manager.config_mcp_servers.update(saved_config_servers)+ global_mcp_server_manager.tool_name_to_mcp_server_name_mapping.clear()+ global_mcp_server_manager.tool_name_to_mcp_server_name_mapping.update(saved_tool_mapping)+ global_mcp_server_manager._oauth_discovery_slots = saved_oauth_slots++[email protected](autouse=True)+def _hermetic_server_root_path():+ saved = os.environ.pop("SERVER_ROOT_PATH", None)+ try:+ yield+ finally:+ if saved is not None:+ os.environ["SERVER_ROOT_PATH"] = saved+++def _mcp_request_ctx():+ def _mcp_request_ctx(**overrides):+ from types import SimpleNamespace++ from mcp.server.context import ServerRequestContext++ kwargs = {+ "session": SimpleNamespace(),+ "lifespan_context": {},+ "protocol_version": "2025-06-18",+ "method": "",+ "params": None,+ "request_id": 1,+ "meta": None,+ "request": None,+ }+ kwargs.update(overrides)+ return ServerRequestContext(**kwargs)++ return _mcp_request_ctxdiff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.py b/tests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.pysimilarity index 100%rename from tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.pyrename to tests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.pydiff --git a/tests/test_litellm/proxy/auth/test_admin_viewer_handler_access.py b/tests/unit/proxy/auth/test_admin_viewer_handler_access.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_admin_viewer_handler_access.pyrename to tests/unit/proxy/auth/test_admin_viewer_handler_access.pydiff --git a/tests/test_litellm/proxy/auth/test_auth_checks.py b/tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_auth_checks.pyrename to tests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.pydiff --git a/tests/test_litellm/proxy/auth/test_auth_exception_handler.py b/tests/unit/proxy/auth/test_auth_exception_handler.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_auth_exception_handler.pyrename to tests/unit/proxy/auth/test_auth_exception_handler.pydiff --git a/tests/test_litellm/proxy/auth/test_auth_hot_path_network_requests.py b/tests/unit/proxy/auth/test_auth_hot_path_network_requests.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_auth_hot_path_network_requests.pyrename to tests/unit/proxy/auth/test_auth_hot_path_network_requests.pydiff --git a/tests/test_litellm/proxy/auth/test_auth_object_prefetch.py b/tests/unit/proxy/auth/test_auth_object_prefetch.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_auth_object_prefetch.pyrename to tests/unit/proxy/auth/test_auth_object_prefetch.pydiff --git a/tests/test_litellm/proxy/auth/test_auth_utils.py b/tests/unit/proxy/auth/test_auth_utils.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_auth_utils.pyrename to tests/unit/proxy/auth/test_auth_utils.pydiff --git a/tests/test_litellm/proxy/auth/test_banned_params_extra_body.py b/tests/unit/proxy/auth/test_banned_params_extra_body.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_banned_params_extra_body.pyrename to tests/unit/proxy/auth/test_banned_params_extra_body.pydiff --git a/tests/test_litellm/proxy/auth/test_cli_auth.py b/tests/unit/proxy/auth/test_cli_auth.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_cli_auth.pyrename to tests/unit/proxy/auth/test_cli_auth.pydiff --git a/tests/test_litellm/proxy/auth/test_custom_auth_end_user_budget.py b/tests/unit/proxy/auth/test_custom_auth_end_user_budget.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_custom_auth_end_user_budget.pyrename to tests/unit/proxy/auth/test_custom_auth_end_user_budget.pydiff --git a/tests/test_litellm/proxy/auth/test_fallback_budget.py b/tests/unit/proxy/auth/test_fallback_budget.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_fallback_budget.pyrename to tests/unit/proxy/auth/test_fallback_budget.pydiff --git a/tests/test_litellm/proxy/auth/test_fallback_model_access.py b/tests/unit/proxy/auth/test_fallback_model_access.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_fallback_model_access.pyrename to tests/unit/proxy/auth/test_fallback_model_access.pydiff --git a/tests/test_litellm/proxy/auth/test_handle_jwt.py b/tests/unit/proxy/auth/test_handle_jwt.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_handle_jwt.pyrename to tests/unit/proxy/auth/test_handle_jwt.pydiff --git a/tests/test_litellm/proxy/auth/test_info_routes.py b/tests/unit/proxy/auth/test_info_routes.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_info_routes.pyrename to tests/unit/proxy/auth/test_info_routes.pydiff --git a/tests/test_litellm/proxy/auth/test_litellm_license.py b/tests/unit/proxy/auth/test_litellm_license.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_litellm_license.pyrename to tests/unit/proxy/auth/test_litellm_license.pydiff --git a/tests/test_litellm/proxy/auth/test_login_utils.py b/tests/unit/proxy/auth/test_login_utils.pysimilarity index 99%rename from tests/test_litellm/proxy/auth/test_login_utils.pyrename to tests/unit/proxy/auth/test_login_utils.pyindex 1b15994e777..28ca47d01de 100644--- a/tests/test_litellm/proxy/auth/test_login_utils.py+++ b/tests/unit/proxy/auth/test_login_utils.py@@ -15,6 +15,7 @@ from unittest.mock import AsyncMock, MagicMock, patchimport httpximport pytest+import respxif TYPE_CHECKING:from litellm.proxy.auth.login_throttle import LoginThrottle@@ -1978,10 +1979,15 @@ class TestDisableEnvCredentialLogin:assert exc_info.value.code == "401"@pytest.mark.asyncio- async def test_db_user_login_still_works_when_disabled(self):+ @respx.mock+ async def test_db_user_login_still_works_when_disabled(self, httpx_transport):master_key = "sk-1234"user_email = "[email protected]"password = "Str0ng!Passw0rd"+ sha1 = hashlib.sha1(password.encode("utf-8"), usedforsecurity=False).hexdigest().upper()+ respx.get(f"https://api.pwnedpasswords.com/range/{sha1[:5]}").mock(+ return_value=httpx.Response(200, text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:41")+ )mock_user = LiteLLM_UserTable(user_id="db-admin-1",diff --git a/tests/test_litellm/proxy/auth/test_master_key_boot_check.py b/tests/unit/proxy/auth/test_master_key_boot_check.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_master_key_boot_check.pyrename to tests/unit/proxy/auth/test_master_key_boot_check.pydiff --git a/tests/test_litellm/proxy/auth/test_mcp_ip_filtering.py b/tests/unit/proxy/auth/test_mcp_ip_filtering.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_mcp_ip_filtering.pyrename to tests/unit/proxy/auth/test_mcp_ip_filtering.pydiff --git a/tests/test_litellm/proxy/auth/test_model_access_group_budgets.py b/tests/unit/proxy/auth/test_model_access_group_budgets.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_model_access_group_budgets.pyrename to tests/unit/proxy/auth/test_model_access_group_budgets.pydiff --git a/tests/test_litellm/proxy/auth/test_model_checks.py b/tests/unit/proxy/auth/test_model_checks.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_model_checks.pyrename to tests/unit/proxy/auth/test_model_checks.pydiff --git a/tests/test_litellm/proxy/auth/test_model_checks_fallbacks.py b/tests/unit/proxy/auth/test_model_checks_fallbacks.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_model_checks_fallbacks.pyrename to tests/unit/proxy/auth/test_model_checks_fallbacks.pydiff --git a/tests/test_litellm/proxy/auth/test_multi_budget_windows.py b/tests/unit/proxy/auth/test_multi_budget_windows.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_multi_budget_windows.pyrename to tests/unit/proxy/auth/test_multi_budget_windows.pydiff --git a/tests/test_litellm/proxy/auth/test_network.py b/tests/unit/proxy/auth/test_network.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_network.pyrename to tests/unit/proxy/auth/test_network.pydiff --git a/tests/test_litellm/proxy/auth/test_oauth2_proxy_hook.py b/tests/unit/proxy/auth/test_oauth2_proxy_hook.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_oauth2_proxy_hook.pyrename to tests/unit/proxy/auth/test_oauth2_proxy_hook.pydiff --git a/tests/test_litellm/proxy/auth/test_object_permission_loading.py b/tests/unit/proxy/auth/test_object_permission_loading.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_object_permission_loading.pyrename to tests/unit/proxy/auth/test_object_permission_loading.pydiff --git a/tests/test_litellm/proxy/auth/test_onboarding.py b/tests/unit/proxy/auth/test_onboarding.pysimilarity index 99%rename from tests/test_litellm/proxy/auth/test_onboarding.pyrename to tests/unit/proxy/auth/test_onboarding.pyindex 5d173e57cdf..46a48c21353 100644--- a/tests/test_litellm/proxy/auth/test_onboarding.py+++ b/tests/unit/proxy/auth/test_onboarding.py@@ -632,7 +632,7 @@ async def test_claim_token_rejects_short_password_before_consuming_invite():@pytest.mark.asyncio@respx.mock-async def test_claim_token_rejects_breached_password_before_consuming_invite():+async def test_claim_token_rejects_breached_password_before_consuming_invite(httpx_transport):"""A password found in the HIBP corpus must be rejected and never stored."""from litellm.proxy.proxy_server import claim_onboarding_link@@ -666,7 +666,7 @@ async def test_claim_token_rejects_breached_password_before_consuming_invite():@pytest.mark.asyncio@respx.mock-async def test_claim_token_fails_open_when_hibp_unreachable():+async def test_claim_token_fails_open_when_hibp_unreachable(httpx_transport):"""An HIBP outage must never block onboarding: the claim proceeds."""from litellm.proxy.proxy_server import claim_onboarding_linkdiff --git a/tests/test_litellm/proxy/auth/test_organization_budget_enforcement.py b/tests/unit/proxy/auth/test_organization_budget_enforcement.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_organization_budget_enforcement.pyrename to tests/unit/proxy/auth/test_organization_budget_enforcement.pydiff --git a/tests/test_litellm/proxy/auth/test_password_hashing.py b/tests/unit/proxy/auth/test_password_hashing.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_password_hashing.pyrename to tests/unit/proxy/auth/test_password_hashing.pydiff --git a/tests/test_litellm/proxy/auth/test_password_policy.py b/tests/unit/proxy/auth/test_password_policy.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_password_policy.pyrename to tests/unit/proxy/auth/test_password_policy.pydiff --git a/tests/test_litellm/proxy/auth/test_resolvers_exceptions.py b/tests/unit/proxy/auth/test_resolvers_exceptions.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_resolvers_exceptions.pyrename to tests/unit/proxy/auth/test_resolvers_exceptions.pydiff --git a/tests/test_litellm/proxy/auth/test_resolvers_grants.py b/tests/unit/proxy/auth/test_resolvers_grants.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_resolvers_grants.pyrename to tests/unit/proxy/auth/test_resolvers_grants.pydiff --git a/tests/test_litellm/proxy/auth/test_resolvers_models.py b/tests/unit/proxy/auth/test_resolvers_models.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_resolvers_models.pyrename to tests/unit/proxy/auth/test_resolvers_models.pydiff --git a/tests/test_litellm/proxy/auth/test_resolvers_seam.py b/tests/unit/proxy/auth/test_resolvers_seam.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_resolvers_seam.pyrename to tests/unit/proxy/auth/test_resolvers_seam.pydiff --git a/tests/test_litellm/proxy/auth/test_resolvers_store.py b/tests/unit/proxy/auth/test_resolvers_store.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_resolvers_store.pyrename to tests/unit/proxy/auth/test_resolvers_store.pydiff --git a/tests/test_litellm/proxy/auth/test_route_checks.py b/tests/unit/proxy/auth/test_route_checks.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_route_checks.pyrename to tests/unit/proxy/auth/test_route_checks.pydiff --git a/tests/test_litellm/proxy/auth/test_router_override_fallback_auth.py b/tests/unit/proxy/auth/test_router_override_fallback_auth.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_router_override_fallback_auth.pyrename to tests/unit/proxy/auth/test_router_override_fallback_auth.pydiff --git a/tests/test_litellm/proxy/auth/test_team_grants.py b/tests/unit/proxy/auth/test_team_grants.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_team_grants.pyrename to tests/unit/proxy/auth/test_team_grants.pydiff --git a/tests/test_litellm/proxy/auth/test_team_member_budget.py b/tests/unit/proxy/auth/test_team_member_budget.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_team_member_budget.pyrename to tests/unit/proxy/auth/test_team_member_budget.pydiff --git a/tests/test_litellm/proxy/auth/test_unmapped_model_budget_enforcement.py b/tests/unit/proxy/auth/test_unmapped_model_budget_enforcement.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_unmapped_model_budget_enforcement.pyrename to tests/unit/proxy/auth/test_unmapped_model_budget_enforcement.pydiff --git a/tests/test_litellm/proxy/auth/test_user_api_key_auth.py b/tests/unit/proxy/auth/test_user_api_key_auth_request_flow.pysimilarity index 100%rename from tests/test_litellm/proxy/auth/test_user_api_key_auth.pyrename to tests/unit/proxy/auth/test_user_api_key_auth_request_flow.pydiff --git a/tests/test_litellm/proxy/client/cli/autoroute/__init__.py b/tests/unit/proxy/client/__init__.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/autoroute/__init__.pyrename to tests/unit/proxy/client/__init__.pydiff --git a/tests/test_litellm/proxy/client/cli/__init__.py b/tests/unit/proxy/client/cli/__init__.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/__init__.pyrename to tests/unit/proxy/client/cli/__init__.pydiff --git a/tests/test_litellm/proxy/policy_engine/__init__.py b/tests/unit/proxy/client/cli/autoroute/__init__.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/__init__.pyrename to tests/unit/proxy/client/cli/autoroute/__init__.pydiff --git a/tests/test_litellm/proxy/client/cli/autoroute/test_commands.py b/tests/unit/proxy/client/cli/autoroute/test_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/autoroute/test_commands.pyrename to tests/unit/proxy/client/cli/autoroute/test_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/autoroute/test_config.py b/tests/unit/proxy/client/cli/autoroute/test_config.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/autoroute/test_config.pyrename to tests/unit/proxy/client/cli/autoroute/test_config.pydiff --git a/tests/test_litellm/proxy/client/cli/autoroute/test_process.py b/tests/unit/proxy/client/cli/autoroute/test_process.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/autoroute/test_process.pyrename to tests/unit/proxy/client/cli/autoroute/test_process.pydiff --git a/tests/test_litellm/proxy/client/cli/autoroute/test_wizard.py b/tests/unit/proxy/client/cli/autoroute/test_wizard.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/autoroute/test_wizard.pyrename to tests/unit/proxy/client/cli/autoroute/test_wizard.pydiff --git a/tests/test_litellm/proxy/client/cli/conftest.py b/tests/unit/proxy/client/cli/conftest.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/conftest.pyrename to tests/unit/proxy/client/cli/conftest.pydiff --git a/tests/test_litellm/proxy/client/cli/test_agents.py b/tests/unit/proxy/client/cli/test_agents.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_agents.pyrename to tests/unit/proxy/client/cli/test_agents.pydiff --git a/tests/test_litellm/proxy/client/cli/test_auth_commands.py b/tests/unit/proxy/client/cli/test_auth_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_auth_commands.pyrename to tests/unit/proxy/client/cli/test_auth_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_claude_settings.py b/tests/unit/proxy/client/cli/test_claude_settings.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_claude_settings.pyrename to tests/unit/proxy/client/cli/test_claude_settings.pydiff --git a/tests/test_litellm/proxy/client/cli/test_codex_settings.py b/tests/unit/proxy/client/cli/test_codex_settings.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_codex_settings.pyrename to tests/unit/proxy/client/cli/test_codex_settings.pydiff --git a/tests/test_litellm/proxy/client/cli/test_config_commands.py b/tests/unit/proxy/client/cli/test_config_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_config_commands.pyrename to tests/unit/proxy/client/cli/test_config_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_configure_commands.py b/tests/unit/proxy/client/cli/test_configure_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_configure_commands.pyrename to tests/unit/proxy/client/cli/test_configure_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_credentials_commands.py b/tests/unit/proxy/client/cli/test_credentials_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_credentials_commands.pyrename to tests/unit/proxy/client/cli/test_credentials_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_debug_commands.py b/tests/unit/proxy/client/cli/test_debug_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_debug_commands.pyrename to tests/unit/proxy/client/cli/test_debug_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_encryption_commands.py b/tests/unit/proxy/client/cli/test_encryption_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_encryption_commands.pyrename to tests/unit/proxy/client/cli/test_encryption_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_global_options.py b/tests/unit/proxy/client/cli/test_global_options.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_global_options.pyrename to tests/unit/proxy/client/cli/test_global_options.pydiff --git a/tests/test_litellm/proxy/client/cli/test_keys_commands.py b/tests/unit/proxy/client/cli/test_keys_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_keys_commands.pyrename to tests/unit/proxy/client/cli/test_keys_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_model_groups_commands.py b/tests/unit/proxy/client/cli/test_model_groups_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_model_groups_commands.pyrename to tests/unit/proxy/client/cli/test_model_groups_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_models_commands.py b/tests/unit/proxy/client/cli/test_models_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_models_commands.pyrename to tests/unit/proxy/client/cli/test_models_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_pi.py b/tests/unit/proxy/client/cli/test_pi.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_pi.pyrename to tests/unit/proxy/client/cli/test_pi.pydiff --git a/tests/test_litellm/proxy/client/cli/test_pkce_login.py b/tests/unit/proxy/client/cli/test_pkce_login.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_pkce_login.pyrename to tests/unit/proxy/client/cli/test_pkce_login.pydiff --git a/tests/test_litellm/proxy/client/cli/test_statusline_script.py b/tests/unit/proxy/client/cli/test_statusline_script.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_statusline_script.pyrename to tests/unit/proxy/client/cli/test_statusline_script.pydiff --git a/tests/test_litellm/proxy/client/cli/test_up_commands.py b/tests/unit/proxy/client/cli/test_up_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_up_commands.pyrename to tests/unit/proxy/client/cli/test_up_commands.pydiff --git a/tests/test_litellm/proxy/client/cli/test_users_commands.py b/tests/unit/proxy/client/cli/test_users_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/cli/test_users_commands.pyrename to tests/unit/proxy/client/cli/test_users_commands.pydiff --git a/tests/test_litellm/proxy/client/conftest.py b/tests/unit/proxy/client/conftest.pysimilarity index 100%rename from tests/test_litellm/proxy/client/conftest.pyrename to tests/unit/proxy/client/conftest.pydiff --git a/tests/test_litellm/proxy/client/test_chat.py b/tests/unit/proxy/client/test_chat.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_chat.pyrename to tests/unit/proxy/client/test_chat.pydiff --git a/tests/test_litellm/proxy/client/test_client.py b/tests/unit/proxy/client/test_client.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_client.pyrename to tests/unit/proxy/client/test_client.pydiff --git a/tests/test_litellm/proxy/client/test_credentials.py b/tests/unit/proxy/client/test_credentials.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_credentials.pyrename to tests/unit/proxy/client/test_credentials.pydiff --git a/tests/test_litellm/proxy/client/test_http_client.py b/tests/unit/proxy/client/test_http_client.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_http_client.pyrename to tests/unit/proxy/client/test_http_client.pydiff --git a/tests/test_litellm/proxy/client/test_http_commands.py b/tests/unit/proxy/client/test_http_commands.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_http_commands.pyrename to tests/unit/proxy/client/test_http_commands.pydiff --git a/tests/test_litellm/proxy/client/test_keys.py b/tests/unit/proxy/client/test_keys.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_keys.pyrename to tests/unit/proxy/client/test_keys.pydiff --git a/tests/test_litellm/proxy/client/test_model_groups.py b/tests/unit/proxy/client/test_model_groups.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_model_groups.pyrename to tests/unit/proxy/client/test_model_groups.pydiff --git a/tests/test_litellm/proxy/client/test_models.py b/tests/unit/proxy/client/test_models.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_models.pyrename to tests/unit/proxy/client/test_models.pydiff --git a/tests/test_litellm/proxy/client/test_teams.py b/tests/unit/proxy/client/test_teams.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_teams.pyrename to tests/unit/proxy/client/test_teams.pydiff --git a/tests/test_litellm/proxy/client/test_users.py b/tests/unit/proxy/client/test_users.pysimilarity index 100%rename from tests/test_litellm/proxy/client/test_users.pyrename to tests/unit/proxy/client/test_users.pydiff --git a/tests/unit/proxy/conftest.py b/tests/unit/proxy/conftest.pyindex 148751c33f2..1d0a7475db6 100644--- a/tests/unit/proxy/conftest.py+++ b/tests/unit/proxy/conftest.py@@ -4,12 +4,15 @@ import asyncioimport copyimport inspectimport warnings+from collections.abc import Iterator+from typing import Dictimport pytestimport litellmimport litellm.proxy.proxy_server+from tests.unit.litellm_core_utils.fake_secret_vault import FakeSecretVault# Top-level assignments of these types are the ones importlib.reload(litellm)@@ -148,3 +151,63 @@ def pytest_collection_modifyitems(config, items):# Reorder the items listitems[:] = custom_logger_tests + other_tests+++_PROXY_MODULE_GLOBALS_TO_ISOLATE = (+ "master_key",+ "prisma_client",+ "llm_router",+)++_proxy_module_globals_snapshot = pytest.StashKey[Dict[str, object]]()++[email protected](hookwrapper=True)+def pytest_runtest_setup(item):+ from litellm.proxy import proxy_server++ item.stash[_proxy_module_globals_snapshot] = {+ name: vars(proxy_server)[name]+ for name in _PROXY_MODULE_GLOBALS_TO_ISOLATE+ if name in vars(proxy_server)+ }+ yield++[email protected](hookwrapper=True)+def pytest_runtest_teardown(item, nextitem):+ yield+ snapshot = item.stash.get(_proxy_module_globals_snapshot, None)+ if snapshot is None:+ return+ from litellm.proxy import proxy_server++ for name in _PROXY_MODULE_GLOBALS_TO_ISOLATE:+ if name in snapshot:+ setattr(proxy_server, name, snapshot[name])+ elif name in vars(proxy_server):+ delattr(proxy_server, name)+++def secret_vault_factory() -> type[FakeSecretVault]:+ return FakeSecretVault+++def httpx_transport(monkeypatch: pytest.MonkeyPatch) -> Iterator[None]:+ monkeypatch.setattr(litellm, "disable_aiohttp_transport", True)+ litellm.in_memory_llm_clients_cache.flush_cache()+ yield+ litellm.in_memory_llm_clients_cache.flush_cache()++[email protected](autouse=True)+def _reset_graceful_shutdown_state():+ from litellm.proxy.shutdown.graceful_shutdown_manager import (+ GracefulShutdownManager,+ )++ GracefulShutdownManager.reset()+ yield+ GracefulShutdownManager.reset()diff --git a/tests/unit/proxy/hooks/litellm_skills/__init__.py b/tests/unit/proxy/hooks/litellm_skills/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/test_litellm/proxy/hooks/litellm_skills/test_main.py b/tests/unit/proxy/hooks/litellm_skills/test_main.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/litellm_skills/test_main.pyrename to tests/unit/proxy/hooks/litellm_skills/test_main.pydiff --git a/tests/test_litellm/proxy/hooks/test_async_post_call_streaming_iterator_hook.py b/tests/unit/proxy/hooks/test_async_post_call_streaming_iterator_hook.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_async_post_call_streaming_iterator_hook.pyrename to tests/unit/proxy/hooks/test_async_post_call_streaming_iterator_hook.pydiff --git a/tests/test_litellm/proxy/hooks/test_autorouter_baseline_cache.py b/tests/unit/proxy/hooks/test_autorouter_baseline_cache.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_autorouter_baseline_cache.pyrename to tests/unit/proxy/hooks/test_autorouter_baseline_cache.pydiff --git a/tests/test_litellm/proxy/hooks/test_batch_enqueued_tokens.py b/tests/unit/proxy/hooks/test_batch_enqueued_tokens.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_batch_enqueued_tokens.pyrename to tests/unit/proxy/hooks/test_batch_enqueued_tokens.pydiff --git a/tests/test_litellm/proxy/hooks/test_batch_file_validation.py b/tests/unit/proxy/hooks/test_batch_file_validation.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_batch_file_validation.pyrename to tests/unit/proxy/hooks/test_batch_file_validation.pydiff --git a/tests/test_litellm/proxy/hooks/test_batch_rate_limiter.py b/tests/unit/proxy/hooks/test_batch_rate_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_batch_rate_limiter.pyrename to tests/unit/proxy/hooks/test_batch_rate_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_dynamic_rate_limiter.py b/tests/unit/proxy/hooks/test_dynamic_rate_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_dynamic_rate_limiter.pyrename to tests/unit/proxy/hooks/test_dynamic_rate_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_dynamic_rate_limiter_v3.py b/tests/unit/proxy/hooks/test_dynamic_rate_limiter_v3.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_dynamic_rate_limiter_v3.pyrename to tests/unit/proxy/hooks/test_dynamic_rate_limiter_v3.pydiff --git a/tests/test_litellm/proxy/hooks/test_image_generation_guardrails.py b/tests/unit/proxy/hooks/test_image_generation_guardrails.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_image_generation_guardrails.pyrename to tests/unit/proxy/hooks/test_image_generation_guardrails.pydiff --git a/tests/test_litellm/proxy/hooks/test_key_management_event_hooks.py b/tests/unit/proxy/hooks/test_key_management_event_hooks.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_key_management_event_hooks.pyrename to tests/unit/proxy/hooks/test_key_management_event_hooks.pydiff --git a/tests/test_litellm/proxy/hooks/test_max_budget_per_session_limiter.py b/tests/unit/proxy/hooks/test_max_budget_per_session_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_max_budget_per_session_limiter.pyrename to tests/unit/proxy/hooks/test_max_budget_per_session_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_max_iterations_limiter.py b/tests/unit/proxy/hooks/test_max_iterations_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_max_iterations_limiter.pyrename to tests/unit/proxy/hooks/test_max_iterations_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_model_max_budget_limiter.py b/tests/unit/proxy/hooks/test_model_max_budget_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_model_max_budget_limiter.pyrename to tests/unit/proxy/hooks/test_model_max_budget_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_parallel_request_limiter.py b/tests/unit/proxy/hooks/test_parallel_request_limiter.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_parallel_request_limiter.pyrename to tests/unit/proxy/hooks/test_parallel_request_limiter.pydiff --git a/tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.py b/tests/unit/proxy/hooks/test_parallel_request_limiter_v3.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_parallel_request_limiter_v3.pyrename to tests/unit/proxy/hooks/test_parallel_request_limiter_v3.pydiff --git a/tests/test_litellm/proxy/hooks/test_post_call_failure_hook_integration.py b/tests/unit/proxy/hooks/test_post_call_failure_hook_integration.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_post_call_failure_hook_integration.pyrename to tests/unit/proxy/hooks/test_post_call_failure_hook_integration.pydiff --git a/tests/test_litellm/proxy/hooks/test_post_call_response_headers_hook.py b/tests/unit/proxy/hooks/test_post_call_response_headers_hook.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_post_call_response_headers_hook.pyrename to tests/unit/proxy/hooks/test_post_call_response_headers_hook.pydiff --git a/tests/test_litellm/proxy/hooks/test_post_call_streaming_hook_integration.py b/tests/unit/proxy/hooks/test_post_call_streaming_hook_integration.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_post_call_streaming_hook_integration.pyrename to tests/unit/proxy/hooks/test_post_call_streaming_hook_integration.pydiff --git a/tests/test_litellm/proxy/hooks/test_post_call_success_hook_integration.py b/tests/unit/proxy/hooks/test_post_call_success_hook_integration.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_post_call_success_hook_integration.pyrename to tests/unit/proxy/hooks/test_post_call_success_hook_integration.pydiff --git a/tests/test_litellm/proxy/hooks/test_prompt_cache_observer.py b/tests/unit/proxy/hooks/test_prompt_cache_observer.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_prompt_cache_observer.pyrename to tests/unit/proxy/hooks/test_prompt_cache_observer.pydiff --git a/tests/test_litellm/proxy/hooks/test_prompt_injection_detection.py b/tests/unit/proxy/hooks/test_prompt_injection_detection.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_prompt_injection_detection.pyrename to tests/unit/proxy/hooks/test_prompt_injection_detection.pydiff --git a/tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py b/tests/unit/proxy/hooks/test_proxy_hooks_init.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_proxy_hooks_init.pyrename to tests/unit/proxy/hooks/test_proxy_hooks_init.pydiff --git a/tests/test_litellm/proxy/hooks/test_proxy_rate_limit_provider_field.py b/tests/unit/proxy/hooks/test_proxy_rate_limit_provider_field.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_proxy_rate_limit_provider_field.pyrename to tests/unit/proxy/hooks/test_proxy_rate_limit_provider_field.pydiff --git a/tests/test_litellm/proxy/hooks/test_proxy_track_cost_callback.py b/tests/unit/proxy/hooks/test_proxy_track_cost_callback.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_proxy_track_cost_callback.pyrename to tests/unit/proxy/hooks/test_proxy_track_cost_callback.pydiff --git a/tests/test_litellm/proxy/hooks/test_rate_limiter_toctou.py b/tests/unit/proxy/hooks/test_rate_limiter_toctou.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_rate_limiter_toctou.pyrename to tests/unit/proxy/hooks/test_rate_limiter_toctou.pydiff --git a/tests/test_litellm/proxy/hooks/test_send_invite_email.py b/tests/unit/proxy/hooks/test_send_invite_email.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_send_invite_email.pyrename to tests/unit/proxy/hooks/test_send_invite_email.pydiff --git a/tests/test_litellm/proxy/hooks/test_sensitive_data_routing.py b/tests/unit/proxy/hooks/test_sensitive_data_routing.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_sensitive_data_routing.pyrename to tests/unit/proxy/hooks/test_sensitive_data_routing.pydiff --git a/tests/test_litellm/proxy/hooks/test_tpm_concurrent.py b/tests/unit/proxy/hooks/test_tpm_concurrent.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_tpm_concurrent.pyrename to tests/unit/proxy/hooks/test_tpm_concurrent.pydiff --git a/tests/test_litellm/proxy/hooks/test_user_management_event_hooks.py b/tests/unit/proxy/hooks/test_user_management_event_hooks.pysimilarity index 100%rename from tests/test_litellm/proxy/hooks/test_user_management_event_hooks.pyrename to tests/unit/proxy/hooks/test_user_management_event_hooks.pydiff --git a/tests/unit/proxy/policy_engine/__init__.py b/tests/unit/proxy/policy_engine/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/test_litellm/proxy/policy_engine/test_attachment_registry.py b/tests/unit/proxy/policy_engine/test_attachment_registry.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_attachment_registry.pyrename to tests/unit/proxy/policy_engine/test_attachment_registry.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_condition_evaluator.py b/tests/unit/proxy/policy_engine/test_condition_evaluator.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_condition_evaluator.pyrename to tests/unit/proxy/policy_engine/test_condition_evaluator.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_pipeline_executor.py b/tests/unit/proxy/policy_engine/test_pipeline_executor.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_pipeline_executor.pyrename to tests/unit/proxy/policy_engine/test_pipeline_executor.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_engine_endpoints.py b/tests/unit/proxy/policy_engine/test_policy_engine_endpoints.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_engine_endpoints.pyrename to tests/unit/proxy/policy_engine/test_policy_engine_endpoints.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_matcher.py b/tests/unit/proxy/policy_engine/test_policy_matcher.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_matcher.pyrename to tests/unit/proxy/policy_engine/test_policy_matcher.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_resolver.py b/tests/unit/proxy/policy_engine/test_policy_resolver.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_resolver.pyrename to tests/unit/proxy/policy_engine/test_policy_resolver.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_validator.py b/tests/unit/proxy/policy_engine/test_policy_validator.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_validator.pyrename to tests/unit/proxy/policy_engine/test_policy_validator.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_versioning.py b/tests/unit/proxy/policy_engine/test_policy_versioning.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_versioning.pyrename to tests/unit/proxy/policy_engine/test_policy_versioning.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_policy_versioning_e2e.py b/tests/unit/proxy/policy_engine/test_policy_versioning_e2e.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_policy_versioning_e2e.pyrename to tests/unit/proxy/policy_engine/test_policy_versioning_e2e.pydiff --git a/tests/test_litellm/proxy/policy_engine/test_response_retrieval.py b/tests/unit/proxy/policy_engine/test_response_retrieval.pysimilarity index 100%rename from tests/test_litellm/proxy/policy_engine/test_response_retrieval.pyrename to tests/unit/proxy/policy_engine/test_response_retrieval.pydiff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/unit/proxy/test_proxy_server_endpoints_and_startup.pysimilarity index 100%rename from tests/test_litellm/proxy/test_proxy_server.pyrename to tests/unit/proxy/test_proxy_server_endpoints_and_startup.pydiff --git a/tests/test_litellm/proxy/test_proxy_utils.py b/tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.pysimilarity index 100%rename from tests/test_litellm/proxy/test_proxy_utils.pyrename to tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py