From 54b734e01532199c20ff5990f52ea23133ea630f Mon Sep 17 00:00:00 2001 From: Lorhan Sohaky Date: Sun, 6 Mar 2022 13:14:24 -0300 Subject: [PATCH] Update test --- tests/test_custom_openapi_subapp.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_custom_openapi_subapp.py b/tests/test_custom_openapi_subapp.py index 50abcd3fa..b0d96710f 100644 --- a/tests/test_custom_openapi_subapp.py +++ b/tests/test_custom_openapi_subapp.py @@ -9,14 +9,18 @@ sub_app = FastAPI( docs_url=None, redoc_url=None, openapi_url=None, - ) +) + @sub_app.get("/items/") async def read_items(): return {"id": "foo"} + @sub_app.get("/openapi.json") -async def openapi(): +async def openapi( + # Custom Deps +): return get_openapi( title="Custom OpenAPI", version="0.1", @@ -36,4 +40,5 @@ def test_sub_app_open_api(): assert response.headers["content-type"] == "application/json" paths = list(response.json()["paths"].keys()) assert paths == [ - "/sub_app/items/", "/sub_app/openapi.json",] + "/sub_app/items/", "/sub_app/openapi.json" + ]