(self)
| 158 | |
| 159 | @pytest.mark.asyncio |
| 160 | async def test_handler_catches_exceptions(self): |
| 161 | mgr = MagicMock() |
| 162 | mgr.stop_agent = AsyncMock(side_effect=RuntimeError("boom")) |
| 163 | result = await handle_agent_tool("agent_stop", {"agent_id": "a1"}, mgr) |
| 164 | data = json.loads(result) |
| 165 | assert "error" in data |
| 166 | assert "boom" in data["error"] |
nothing calls this directly
no test coverage detected