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_http_parsing_utils.py
Ishaan Jaff47ba271d5831
diff --git a/tests/local_testing/test_http_parsing_utils.py b/tests/local_testing/test_http_parsing_utils.pyindex 4d509fc16da..813460c7e27 100644--- a/tests/local_testing/test_http_parsing_utils.py+++ b/tests/local_testing/test_http_parsing_utils.py@@ -11,6 +11,7 @@ sys.path.insert() # Adds the parent directory to the system-pathfrom litellm.proxy.common_utils.http_parsing_utils import _read_request_body+from litellm.proxy._types import ProxyException@pytest.mark.asyncio@@ -48,8 +49,8 @@ async def test_read_request_body_invalid_json():return b'{"key": value}' # Missing quotes around `value`request = MockRequest()- result = await _read_request_body(request)- assert result == {} # Should return an empty dict on failure+ with pytest.raises(ProxyException):+ await _read_request_body(request)@pytest.mark.asyncio@@ -62,8 +63,8 @@ async def test_read_request_body_large_payload():return large_payload.encode()request = MockRequest()- result = await _read_request_body(request)- assert result == {} # Large payloads could trigger errors, so validate behavior+ with pytest.raises(ProxyException):+ await _read_request_body(request)@pytest.mark.asyncio