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

Function test_response_json

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

Source from the content-addressed store, hash-verified

77
78
79def test_response_json():
80 response = httpx.Response(200, json={"hello": "world"})
81
82 assert response.status_code == 200
83 assert response.reason_phrase == "OK"
84 assert str(response.json()) == "{'hello': 'world'}"
85 assert response.headers == {
86 "Content-Length": "17",
87 "Content-Type": "application/json",
88 }
89
90
91def test_raise_for_status():

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.95

Tested by

no test coverage detected