Every test client speaks to 127.0.0.1, since an open door now answers 421 to a Host that is not loopback

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-27 11:52:30 +01:00
1 parent 6513e2ab95
commit 6e51134477
12 files changed
+19 -19

No files matched your search

+2 -2
View File
@@ -140,7 +140,7 @@ def app(tmp_path: Path) -> FastAPI:
@pytest.fixture
def client(app: FastAPI) -> Iterator[TestClient]:
with TestClient(app) as c:
with TestClient(app, base_url="http://127.0.0.1") as c:
yield c
@@ -237,7 +237,7 @@ def test_the_summarise_button_works_with_the_stage_off(
data={"summaries": [{"uid": i["uid"], "summary": "Backend role, Python."}
for i in kw["question"]["summaries"]]}, backend="api"))
res = TestClient(app).post(f"/api/roles/{uid}/summarise")
res = TestClient(app, base_url="http://127.0.0.1").post(f"/api/roles/{uid}/summarise")
assert res.status_code == 202
app.state.queue.drain(timeout=30)