From 2251d84e2af9d11fbfd22d4a257247e0948d004d Mon Sep 17 00:00:00 2001 From: user <70670632+stuxf@users.noreply.github.com> Date: Thu, 14 May 2026 20:16:59 +0000 Subject: [PATCH] chore(proxy): drop redundant _is_json_content_type test class ``_is_json_content_type`` is a 3-line wrapper around the shared ``_normalize_media_type`` helper. Positive coverage lives in ``TestGetRequestBody.test_json_with_charset_param_parses_as_json``; negative coverage is covered transitively by ``TestIsFormContentType``'s non-form parametrize matrix (anything that isn't a form type falls through to the JSON branch). --- .../common_utils/test_http_parsing_utils.py | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/tests/test_litellm/proxy/common_utils/test_http_parsing_utils.py b/tests/test_litellm/proxy/common_utils/test_http_parsing_utils.py index 8115083892e..3d7cb1e35f3 100644 --- a/tests/test_litellm/proxy/common_utils/test_http_parsing_utils.py +++ b/tests/test_litellm/proxy/common_utils/test_http_parsing_utils.py @@ -17,7 +17,6 @@ import litellm from litellm.proxy._types import ProxyException from litellm.proxy.common_utils.http_parsing_utils import ( _is_form_content_type, - _is_json_content_type, _read_request_body, _safe_get_request_headers, _safe_get_request_parsed_body, @@ -958,35 +957,6 @@ class TestReadRequestBodyFormParseFailure: assert str(exc_info.value.code) == "400" -class TestIsJsonContentType: - @pytest.mark.parametrize( - "content_type", - [ - "application/json", - "application/json; charset=utf-8", - "Application/JSON", - " application/json ", - ], - ) - def test_json_types_match(self, content_type): - assert _is_json_content_type(content_type) is True - - @pytest.mark.parametrize( - "content_type", - [ - "", - "application/x-www-form-urlencoded", - "multipart/form-data", - "application/jsonl", - "application/jsonschema", - "text/json", - "application/json-patch+json", - ], - ) - def test_non_json_types_rejected(self, content_type): - assert _is_json_content_type(content_type) is False - - class TestGetRequestBody: @pytest.mark.asyncio async def test_json_with_charset_param_parses_as_json(self):