MCPcopy
hub / github.com/fastapi/fastapi / test_frontend_fallback_rejects_invalid_fallback

Function test_frontend_fallback_rejects_invalid_fallback

tests/test_frontend.py:55–61  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

53
54
55def test_frontend_fallback_rejects_invalid_fallback(tmp_path: Path):
56 dist = tmp_path / "dist"
57 dist.mkdir()
58 app = FastAPI()
59
60 with pytest.raises(AssertionError, match="fallback"):
61 app.frontend("/", directory=dist, fallback="invalid") # type: ignore[arg-type] # ty: ignore[invalid-argument-type]
62
63
64def test_index_fallback_ignores_invalid_q_value(tmp_path: Path):

Callers

nothing calls this directly

Calls 2

frontendMethod · 0.95
FastAPIClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…