mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-03 11:39:28 -05:00
* ✨ Add support for UploadFile annotations * 📝 Update File upload docs with FileUpload class * ✅ Add tests for UploadFile support * 📝 Update UploadFile docs
8 lines
173 B
Python
8 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")
|