mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-12 13:36:41 +00:00
✅ Fix OpenAPI test for body schema
This commit is contained in:
parent
d498b7feb3
commit
3180f35bdd
2 changed files with 4 additions and 3 deletions
|
|
@ -35,7 +35,8 @@ test = [
|
||||||
"mypy",
|
"mypy",
|
||||||
"black",
|
"black",
|
||||||
"isort",
|
"isort",
|
||||||
"requests"
|
"requests",
|
||||||
|
"email_validator"
|
||||||
]
|
]
|
||||||
doc = [
|
doc = [
|
||||||
"mkdocs",
|
"mkdocs",
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ openapi_schema = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def openapi_schema():
|
def test_openapi_schema():
|
||||||
response = client.put("/openapi.json")
|
response = client.get("/openapi.json")
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json() == openapi_schema
|
assert response.json() == openapi_schema
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue