mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 10:36:39 +00:00
* ✨ Add support for UploadFile annotations * 📝 Update File upload docs with FileUpload class * ✅ Add tests for UploadFile support * 📝 Update UploadFile docs
7 lines
173 B
Python
7 lines
173 B
Python
import pytest
|
|
from fastapi import UploadFile
|
|
|
|
|
|
def test_upload_file_invalid():
|
|
with pytest.raises(ValueError):
|
|
UploadFile.validate("not a Starlette UploadFile")
|