The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(gateway): read the refusal body before the test client closes
IAvecillaa47853142951
diff --git a/tests/gateway/test_cron_fire_startup_gate.py b/tests/gateway/test_cron_fire_startup_gate.pyindex 71e70941bf1..abeb62ca3e6 100644--- a/tests/gateway/test_cron_fire_startup_gate.py+++ b/tests/gateway/test_cron_fire_startup_gate.py@@ -58,8 +58,10 @@ async def _post_fire(adapter, runner):app.router.add_post("/api/cron/fire", adapter._handle_cron_fire)with patch("gateway.run._gateway_runner_ref", lambda: runner):async with TestClient(TestServer(app)) as cli:- return await cli.post(+ resp = await cli.post("/api/cron/fire", headers={"Authorization": "Bearer good"}, json={"job_id": "job-1"})+ await resp.read() # keep the body readable after the client closes+ return respasync def _wait_for(predicate, timeout=2.0):