Skip to content

Commit 15de00c

Browse files
committed
multipart: multiline file for multiple chunks
1 parent a2d4b2b commit 15de00c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_multipart.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ def test_multipart(value, output):
4444

4545

4646
async def test_async_multipart_streaming(tmp_path, server, anyio_backend):
47+
content = b"\n".join([b"a" * io.DEFAULT_BUFFER_SIZE] * 3)
4748
to_upload = tmp_path / "test.txt"
48-
to_upload.write_bytes(b"<file content>")
49+
to_upload.write_bytes(content)
4950
empty_file = tmp_path / "empty.txt"
5051
empty_file.write_bytes(b"")
5152
opener: typing.Any
@@ -74,7 +75,8 @@ async def test_async_multipart_streaming(tmp_path, server, anyio_backend):
7475
b' filename="test.txt"\r\n',
7576
b"Content-Type: text/plain\r\n",
7677
b"\r\n",
77-
b"<file content>\r\n",
78+
content,
79+
b"\r\n",
7880
b"--" + boundary_bytes + b"--\r\n",
7981
]
8082
)

0 commit comments

Comments
 (0)