()
| 787 | |
| 788 | |
| 789 | def 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 | |
| 801 | def test_json_with_options(): |