(self, tool_name, arguments, namespace=None, timeout=None)
| 57 | return [FakeToolInfo(n) for n in self._results.keys()] if self._results else [] |
| 58 | |
| 59 | async def execute_tool(self, tool_name, arguments, namespace=None, timeout=None): |
| 60 | if self._delay > 0: |
| 61 | await asyncio.sleep(self._delay) |
| 62 | self.calls.append((tool_name, arguments)) |
| 63 | result = self._results.get(tool_name, "default result") |
| 64 | if isinstance(result, Exception): |
| 65 | return FakeToolCallResult( |
| 66 | tool_name=tool_name, success=False, error=str(result) |
| 67 | ) |
| 68 | return FakeToolCallResult(tool_name=tool_name, result=result) |
| 69 | |
| 70 | |
| 71 | class FailingToolManager(FakeToolManager): |
nothing calls this directly
no test coverage detected