| 1 | import unittest |
| 2 | |
| 3 | import mcp_linux |
| 4 | import mcp_win7 |
| 5 | |
| 6 | |
| 7 | class McpSurfaceTest(unittest.TestCase): |
| 8 | def test_windows_lifecycle_is_up_down_status(self): |
| 9 | tools = {tool["name"]: tool for tool in mcp_win7.TOOLS} |
| 10 | lifecycle = {name for name in tools if name.startswith("win7_vm_")} |
| 11 | self.assertEqual(lifecycle, { |
| 12 | "win7_vm_up", "win7_vm_down", "win7_vm_status", |
| 13 | }) |
| 14 | self.assertIn("wait", tools["win7_vm_up"]["inputSchema"]["properties"]) |
| 15 | self.assertIn( |
| 16 | "preserve_machine", |
| 17 | tools["win7_vm_down"]["inputSchema"]["properties"], |
| 18 | ) |
| 19 | |
| 20 | def test_linux_lifecycle_is_fetch_up_down_status(self): |
| 21 | tools = {tool["name"]: tool for tool in mcp_linux.TOOLS} |
| 22 | lifecycle = {name for name in tools if name.startswith("linux_vm_")} |
| 23 | self.assertEqual(lifecycle, { |
| 24 | "linux_vm_fetch", "linux_vm_up", "linux_vm_down", "linux_vm_status", |
| 25 | }) |
| 26 | self.assertIn("wait", tools["linux_vm_up"]["inputSchema"]["properties"]) |
| 27 | self.assertIn( |
| 28 | "preserve_machine", |
| 29 | tools["linux_vm_down"]["inputSchema"]["properties"], |
| 30 | ) |
| 31 | |
| 32 | |
| 33 | if __name__ == "__main__": |
| 34 | unittest.main() |