Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/11253/head
pre-commit-ci[bot] 1 year ago
parent
commit
9ab061ac9a
  1. 8
      tests/test_offline_docs/test_root_path_with_static_mount.py

8
tests/test_offline_docs/test_root_path_with_static_mount.py

@ -1,6 +1,6 @@
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from fastapi.openapi.docs import get_swagger_ui_html
from fastapi.staticfiles import StaticFiles
from fastapi.testclient import TestClient
root_path = "/api"
@ -12,7 +12,10 @@ app = FastAPI(
redoc_url=None,
)
app.mount("/static", StaticFiles(directory="tests/test_offline_docs/static"), name="static")
app.mount(
"/static", StaticFiles(directory="tests/test_offline_docs/static"), name="static"
)
@app.get("/")
async def custom_swagger_ui_html():
@ -27,6 +30,7 @@ async def custom_swagger_ui_html():
swagger_css_url="/static/swagger.css",
)
client = TestClient(app)

Loading…
Cancel
Save