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

Function test_json_with_specified_encoding

tests/models/test_responses.py:789–798  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

787
788
789def test_json_with_specified_encoding():
790 data = {"greeting": "hello", "recipient": "world"}
791 content = json.dumps(data).encode("utf-16")
792 headers = {"Content-Type": "application/json, charset=utf-16"}
793 response = httpx.Response(
794 200,
795 content=content,
796 headers=headers,
797 )
798 assert response.json() == data
799
800
801def test_json_with_options():

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.95

Tested by

no test coverage detected