MCPcopy
hub / github.com/encode/httpx / test_json_without_specified_charset

Function test_json_without_specified_charset

tests/models/test_responses.py:826–835  ·  view source on GitHub ↗
(encoding)

Source from the content-addressed store, hash-verified

824 ],
825)
826def test_json_without_specified_charset(encoding):
827 data = {"greeting": "hello", "recipient": "world"}
828 content = json.dumps(data).encode(encoding)
829 headers = {"Content-Type": "application/json"}
830 response = httpx.Response(
831 200,
832 content=content,
833 headers=headers,
834 )
835 assert response.json() == data
836
837
838@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.95

Tested by

no test coverage detected