(tmp_path: Path)
| 835 | |
| 836 | |
| 837 | def test_apirouter_frontend_uses_include_prefix(tmp_path: Path): |
| 838 | dist = tmp_path / "admin" |
| 839 | write_file(dist / "index.html", "admin") |
| 840 | router = APIRouter() |
| 841 | router.frontend("/", directory=dist, fallback="index.html") |
| 842 | app = FastAPI() |
| 843 | app.include_router(router, prefix="/admin") |
| 844 | |
| 845 | response = TestClient(app).get("/admin/settings", headers={"accept": "text/html"}) |
| 846 | |
| 847 | assert response.status_code == 200 |
| 848 | assert response.text == "admin" |
| 849 | |
| 850 | |
| 851 | def test_global_priority_across_included_routers(tmp_path: Path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…