diff --git a/tests/test_agent_editor_routes.py b/tests/test_agent_editor_routes.py index 89f0beb59..f9f27e3e1 100644 --- a/tests/test_agent_editor_routes.py +++ b/tests/test_agent_editor_routes.py @@ -27,7 +27,8 @@ def _reset_planner(monkeypatch): def client(): app = FastAPI() app.include_router(eaar.setup_editor_agent_routes()) - return TestClient(app) + with TestClient(app) as client: + yield client def test_plan_uses_injected_planner_and_parses_steps(client):