()
| 77 | |
| 78 | |
| 79 | def 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 | |
| 91 | def test_raise_for_status(): |