(self)
| 77 | |
| 78 | @pytest.mark.asyncio |
| 79 | async def test_agent_message(self): |
| 80 | mgr = MagicMock() |
| 81 | mgr.send_message = AsyncMock(return_value=True) |
| 82 | result = await handle_agent_tool( |
| 83 | "agent_message", |
| 84 | {"agent_id": "a1", "content": "hello"}, |
| 85 | mgr, |
| 86 | caller_agent_id="supervisor", |
| 87 | ) |
| 88 | data = json.loads(result) |
| 89 | assert data["success"] is True |
| 90 | mgr.send_message.assert_awaited_once_with("supervisor", "a1", "hello") |
| 91 | |
| 92 | @pytest.mark.asyncio |
| 93 | async def test_agent_message_missing_fields(self): |
nothing calls this directly
no test coverage detected