(header: str)
| 84 | ], |
| 85 | ) |
| 86 | def test_multipart_header_without_boundary(header: str) -> None: |
| 87 | client = httpx.Client(transport=httpx.MockTransport(echo_request_content)) |
| 88 | |
| 89 | files = {"file": io.BytesIO(b"<file content>")} |
| 90 | headers = {"content-type": header} |
| 91 | response = client.post("http://127.0.0.1:8000/", files=files, headers=headers) |
| 92 | |
| 93 | assert response.status_code == 200 |
| 94 | assert response.request.headers["Content-Type"] == header |
| 95 | |
| 96 | |
| 97 | @pytest.mark.parametrize(("key"), (b"abc", 1, 2.3, None)) |