(value)
| 112 | |
| 113 | @pytest.mark.parametrize(("value"), (object(), {"key": "value"})) |
| 114 | def test_multipart_invalid_value(value): |
| 115 | client = httpx.Client(transport=httpx.MockTransport(echo_request_content)) |
| 116 | |
| 117 | data = {"text": value} |
| 118 | files = {"file": io.BytesIO(b"<file content>")} |
| 119 | with pytest.raises(TypeError) as e: |
| 120 | client.post("http://127.0.0.1:8000/", data=data, files=files) |
| 121 | assert "Invalid type for value" in str(e.value) |
| 122 | |
| 123 | |
| 124 | def test_multipart_file_tuple(): |