diff --git a/tests/test_litellm/proxy/auth/test_auth_exception_handler.py b/tests/test_litellm/proxy/auth/test_auth_exception_handler.py index 9228cffa9a2..01fd43ee032 100644 --- a/tests/test_litellm/proxy/auth/test_auth_exception_handler.py +++ b/tests/test_litellm/proxy/auth/test_auth_exception_handler.py @@ -144,9 +144,6 @@ async def test_handle_authentication_error_db_infra_error_returns_503(db_error): new_callable=AsyncMock, return_value=None, ), - patch( - "litellm.proxy.auth.auth_exception_handler.seed_request_identity", - ), patch( "litellm.proxy.proxy_server.general_settings", {"allow_requests_on_db_unavailable": False}, @@ -201,9 +198,6 @@ async def test_handle_authentication_error_prisma_engine_teardown_returns_503(): new_callable=AsyncMock, return_value=None, ), - patch( - "litellm.proxy.auth.auth_exception_handler.seed_request_identity", - ), patch( "litellm.proxy.proxy_server.general_settings", {"allow_requests_on_db_unavailable": False}, @@ -251,9 +245,6 @@ async def test_handle_authentication_error_genuine_auth_failure_stays_401(auth_e new_callable=AsyncMock, return_value=None, ), - patch( - "litellm.proxy.auth.auth_exception_handler.seed_request_identity", - ), patch( "litellm.proxy.proxy_server.general_settings", {"allow_requests_on_db_unavailable": False}, diff --git a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py index 8a9da81005f..7a9f73b70f3 100644 --- a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py +++ b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py @@ -321,6 +321,7 @@ class TestAzureAnthropicCostCalculation: assert call_kwargs["model"] == "azure_ai/claude-sonnet-4-5_gb_20250929" assert call_kwargs["custom_llm_provider"] == "azure_ai" + @patch("litellm.completion_cost") def test_cost_calculation_resolves_unknown_model_from_litellm_params( self, mock_completion_cost ): @@ -583,6 +584,7 @@ class TestAzureAnthropicCostCalculation: == "claude-3-5-haiku-20241022" ) + class TestAnthropicBatchPassthroughCostTracking: """Test cases for Anthropic batch passthrough cost tracking functionality""" diff --git a/tests/test_litellm/proxy/test_proxy_cli.py b/tests/test_litellm/proxy/test_proxy_cli.py index e022ec88327..8723273b941 100644 --- a/tests/test_litellm/proxy/test_proxy_cli.py +++ b/tests/test_litellm/proxy/test_proxy_cli.py @@ -1,6 +1,6 @@ import os import sys -from unittest.mock import MagicMock, patch +from unittest.mock import AsyncMock, MagicMock, patch import fastapi import pytest