Skip to content

Commit 9dd0952

Browse files
committed
fix: router-wire test robust to FastAPI _IncludedRouter (CI failure)
1 parent aa5128c commit 9dd0952

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

backend/tests/smoke.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def test_llm_client_import():
6565

6666
def test_routers_wire():
6767
from app.main import app
68-
paths = {r.path for r in app.routes}
68+
# Some FastAPI versions expose included routers as _IncludedRouter objects
69+
# without .path — filter to route objects that actually have paths.
70+
paths = {getattr(r, "path", None) for r in app.routes}
71+
paths.discard(None)
6972
for expected in (
7073
"/api/v1/health",
7174
"/api/v1/settings",

0 commit comments

Comments
 (0)