mirror of https://github.com/tiangolo/fastapi.git
Remove code examples for Python 3.8 in `request_forms_and_files`
This commit is contained in:
parent
7cbbe561f7
commit
d566e0d61f
|
|
@ -1,17 +0,0 @@
|
|||
from fastapi import FastAPI, File, Form, UploadFile
|
||||
from typing_extensions import Annotated
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.post("/files/")
|
||||
async def create_file(
|
||||
file: Annotated[bytes, File()],
|
||||
fileb: Annotated[UploadFile, File()],
|
||||
token: Annotated[str, Form()],
|
||||
):
|
||||
return {
|
||||
"file_size": len(file),
|
||||
"token": token,
|
||||
"fileb_content_type": fileb.content_type,
|
||||
}
|
||||
|
|
@ -5,15 +5,12 @@ from dirty_equals import IsDict
|
|||
from fastapi import FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from ...utils import needs_py39
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
name="app",
|
||||
params=[
|
||||
"tutorial001",
|
||||
"tutorial001_an",
|
||||
pytest.param("tutorial001_an_py39", marks=needs_py39),
|
||||
"tutorial001_py39",
|
||||
"tutorial001_an_py39",
|
||||
],
|
||||
)
|
||||
def get_app(request: pytest.FixtureRequest):
|
||||
|
|
|
|||
Loading…
Reference in New Issue