Create a mock tool.
()
| 16 | |
| 17 | @pytest.fixture |
| 18 | def mock_tool(): |
| 19 | """Create a mock tool.""" |
| 20 | tool = MagicMock() |
| 21 | tool.name = "test_tool" |
| 22 | tool.namespace = "test_server" |
| 23 | tool.fully_qualified_name = "test_server.test_tool" |
| 24 | tool.inputSchema = None # Explicitly set to None to avoid MagicMock auto-creation |
| 25 | tool.parameters = { |
| 26 | "properties": { |
| 27 | "text": {"type": "string", "description": "Test text"}, |
| 28 | "count": {"type": "number", "description": "Count"}, |
| 29 | }, |
| 30 | "required": ["text"], |
| 31 | } |
| 32 | return tool |
| 33 | |
| 34 | |
| 35 | @pytest.fixture |
nothing calls this directly
no outgoing calls
no test coverage detected