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
+5
-5
@@ -69,7 +69,7 @@ def queue(app: FastAPI) -> Any:
|
||||
|
||||
@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
|
||||
|
||||
|
||||
@@ -1763,7 +1763,7 @@ def test_the_pull_a_source_switch_queues_is_refused_quietly_while_one_runs(
|
||||
nothing else here needs mocking."""
|
||||
from app.jobs import pull
|
||||
|
||||
client = TestClient(app)
|
||||
client = TestClient(app, base_url="http://127.0.0.1")
|
||||
board = store.add_subscription("ats", "greenhouse:acme", label="Acme", company="Acme",
|
||||
board="greenhouse")
|
||||
running = pull.claim_run(store)
|
||||
@@ -1830,7 +1830,7 @@ def test_summarise_queues_one_role_and_the_job_writes_it(
|
||||
|
||||
monkeypatch.setitem(JOBS, "summarise_batch",
|
||||
replace(JOBS["summarise_batch"], isolate=False, timeout=0.0))
|
||||
client = TestClient(app)
|
||||
client = TestClient(app, base_url="http://127.0.0.1")
|
||||
upsert(store, posting("1"))
|
||||
upsert(store, posting("2"))
|
||||
uid, bare = posting("1").uid, posting("2").uid
|
||||
@@ -1920,7 +1920,7 @@ def test_saving_or_liking_a_role_queues_its_summary_once(
|
||||
|
||||
monkeypatch.setattr(agent, "backend", lambda settings: "api")
|
||||
app.state.config.summarise.enabled = True
|
||||
client = TestClient(app)
|
||||
client = TestClient(app, base_url="http://127.0.0.1")
|
||||
upsert(store, posting("1"))
|
||||
upsert(store, posting("2"))
|
||||
saved, liked = posting("1").uid, posting("2").uid
|
||||
@@ -1945,7 +1945,7 @@ def test_saving_queues_no_summary_when_the_stage_is_off_or_it_has_one(
|
||||
from desk.tools import agent
|
||||
|
||||
monkeypatch.setattr(agent, "backend", lambda settings: "api")
|
||||
client = TestClient(app)
|
||||
client = TestClient(app, base_url="http://127.0.0.1")
|
||||
upsert(store, posting("1"))
|
||||
upsert(store, posting("2"))
|
||||
off, done = posting("1").uid, posting("2").uid
|
||||
|
||||
Reference in new issue
Block a user