(encoding)
| 824 | ], |
| 825 | ) |
| 826 | def test_json_without_specified_charset(encoding): |
| 827 | data = {"greeting": "hello", "recipient": "world"} |
| 828 | content = json.dumps(data).encode(encoding) |
| 829 | headers = {"Content-Type": "application/json"} |
| 830 | response = httpx.Response( |
| 831 | 200, |
| 832 | content=content, |
| 833 | headers=headers, |
| 834 | ) |
| 835 | assert response.json() == data |
| 836 | |
| 837 | |
| 838 | @pytest.mark.parametrize( |