()
| 54 | |
| 55 | @pytest.mark.anyio |
| 56 | async def test_upload_file(): |
| 57 | stream = io.BytesIO(b"data") |
| 58 | file = UploadFile(filename="file", file=stream, size=4) |
| 59 | assert await file.read() == b"data" |
| 60 | assert file.size == 4 |
| 61 | await file.write(b" and more data!") |
| 62 | assert await file.read() == b"" |
| 63 | assert file.size == 19 |
| 64 | await file.seek(0) |
| 65 | assert await file.read() == b"data and more data!" |
| 66 | await file.close() |
nothing calls this directly
no test coverage detected
searching dependent graphs…