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:
1 parent
6513e2ab95
commit
6e51134477
12 files changed
+19
-19
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user