Browse Source

Improve code coverage

pull/4657/head
Lorhan Sohaky 3 years ago
parent
commit
8296742ce8
  1. 7
      tests/test_custom_openapi_subapp.py

7
tests/test_custom_openapi_subapp.py

@ -10,11 +10,6 @@ sub_app = FastAPI(
)
@sub_app.get("/items/")
async def read_items():
return {"id": "foo"}
@sub_app.get("/openapi.json")
async def openapi(
# Custom Deps
@ -38,4 +33,4 @@ def test_sub_app_open_api():
assert response.status_code == 200, response.json()
assert response.headers["content-type"] == "application/json"
paths = list(response.json()["paths"].keys())
assert paths == ["/sub_app/items/", "/sub_app/openapi.json"]
assert paths == ["/sub_app/openapi.json"]

Loading…
Cancel
Save