pre-commit-ci-lite[bot]
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
4 deletions
-
fastapi/routing.py
-
tests/test_router_mount.py
|
|
|
@ -1550,7 +1550,9 @@ class APIRouter(routing.Router): |
|
|
|
prefix + route.path, route.endpoint, name=route.name |
|
|
|
) |
|
|
|
elif isinstance(route, routing.Mount): |
|
|
|
self.mount(prefix + router.prefix + route.path, route.app, name=route.name) |
|
|
|
self.mount( |
|
|
|
prefix + router.prefix + route.path, route.app, name=route.name |
|
|
|
) |
|
|
|
|
|
|
|
for handler in router.on_startup: |
|
|
|
self.add_event_handler("startup", handler) |
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
from fastapi import FastAPI, APIRouter |
|
|
|
from fastapi import APIRouter, FastAPI |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
|
|
|
|
|
|
|
|
|