|
|
|
@ -5,7 +5,6 @@ from starlette.testclient import TestClient |
|
|
|
from typing_extensions import Annotated |
|
|
|
|
|
|
|
app = FastAPI() |
|
|
|
client = TestClient(app) |
|
|
|
|
|
|
|
|
|
|
|
@app.post("/urlencoded") |
|
|
|
@ -21,6 +20,9 @@ async def post_multi_part( |
|
|
|
return {"file": file, "age": age} |
|
|
|
|
|
|
|
|
|
|
|
client = TestClient(app) |
|
|
|
|
|
|
|
|
|
|
|
def test_form_default_url_encoded(): |
|
|
|
response = client.post("/urlencoded", data={"age": ""}) |
|
|
|
assert response.status_code == 200 |
|
|
|
|