Skip to content

Commit 3a16e34

Browse files
committed
test upload with real media file
1 parent 2627ec8 commit 3a16e34

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_tusd.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ def test_tusd_upload(tusd_server):
2424
assert uploader.offset == 1337
2525

2626

27-
def test_tusd_upload_hooks(tusd_server_with_hooks, start_fastapi_server):
27+
def test_tusd_upload_hooks(tusd_server_with_hooks, start_fastapi_server, color_bars_video):
2828
my_client = client.TusClient(url=tusd_server_with_hooks.url)
2929

30-
uploader = my_client.uploader(file_stream=(io.BytesIO(b"X" * 1337)), chunk_size=500)
30+
with color_bars_video.open("rb") as f:
31+
uploader = my_client.uploader(file_stream=f, chunk_size=500)
3132

32-
uploader.upload()
33+
uploader.upload()
3334

34-
assert uploader.offset == 1337
35+
assert uploader.offset == color_bars_video.stat().st_size

0 commit comments

Comments
 (0)