Skip to content

Commit

Permalink
multipart: multiline file for multiple chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
tsimoshka committed Dec 1, 2024
1 parent a2d4b2b commit 15de00c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def test_multipart(value, output):


async def test_async_multipart_streaming(tmp_path, server, anyio_backend):
content = b"\n".join([b"a" * io.DEFAULT_BUFFER_SIZE] * 3)
to_upload = tmp_path / "test.txt"
to_upload.write_bytes(b"<file content>")
to_upload.write_bytes(content)
empty_file = tmp_path / "empty.txt"
empty_file.write_bytes(b"")
opener: typing.Any
Expand Down Expand Up @@ -74,7 +75,8 @@ async def test_async_multipart_streaming(tmp_path, server, anyio_backend):
b' filename="test.txt"\r\n',
b"Content-Type: text/plain\r\n",
b"\r\n",
b"<file content>\r\n",
content,
b"\r\n",
b"--" + boundary_bytes + b"--\r\n",
]
)
Expand Down

0 comments on commit 15de00c

Please sign in to comment.