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
+2
-2
@@ -383,7 +383,7 @@ def test_the_api_lists_the_unmapped_words(tmp_path: Path) -> None:
|
||||
database=tmp_path / "roledesk.db"))
|
||||
app.state.store.upsert_role(item("1", employment="Zero hours"))
|
||||
prep.run(app.state.store, tables=TABLES)
|
||||
with TestClient(app) as client:
|
||||
with TestClient(app, base_url="http://127.0.0.1") as client:
|
||||
found = client.get("/api/prep/unmapped").json()
|
||||
assert [(w["field"], w["host"], w["word"], w["roles"]) for w in found] == \
|
||||
[("employment", "acme", "zero hours", 1)]
|
||||
@@ -399,7 +399,7 @@ def test_the_api_lists_the_unlinked_places(tmp_path: Path) -> None:
|
||||
database=tmp_path / "roledesk.db"))
|
||||
app.state.store.upsert_role(item("1", place="Ellwangen", country="DE"))
|
||||
prep.run(app.state.store, tables=TABLES)
|
||||
with TestClient(app) as client:
|
||||
with TestClient(app, base_url="http://127.0.0.1") as client:
|
||||
found = client.get("/api/prep/unlinked").json()
|
||||
assert found == [{"fold": "ellwangen", "text": "Ellwangen", "roles": 1,
|
||||
"countries": [["DE", 1]], "companies": ["Acme"]}]
|
||||
|
||||
Reference in new issue
Block a user