()
| 799 | |
| 800 | |
| 801 | def test_json_with_options(): |
| 802 | data = {"greeting": "hello", "recipient": "world", "amount": 1} |
| 803 | content = json.dumps(data).encode("utf-16") |
| 804 | headers = {"Content-Type": "application/json, charset=utf-16"} |
| 805 | response = httpx.Response( |
| 806 | 200, |
| 807 | content=content, |
| 808 | headers=headers, |
| 809 | ) |
| 810 | assert response.json(parse_int=str)["amount"] == "1" |
| 811 | |
| 812 | |
| 813 | @pytest.mark.parametrize( |