| 16 | |
| 17 | |
| 18 | class TestToolRegistry(unittest.TestCase): |
| 19 | def test_default_registry_has_six_tools(self): |
| 20 | registry = ToolRegistry.default() |
| 21 | tools = registry.all_tools() |
| 22 | self.assertEqual(len(tools), 6) |
| 23 | names = {t.name for t in tools} |
| 24 | self.assertEqual(names, {"bash", "read_file", "write_file", "edit_file", "glob", "grep"}) |
| 25 | |
| 26 | def test_api_schemas_valid(self): |
| 27 | registry = ToolRegistry.default() |
| 28 | schemas = registry.api_schemas() |
| 29 | self.assertEqual(len(schemas), 6) |
| 30 | for schema in schemas: |
| 31 | self.assertIn("name", schema) |
| 32 | self.assertIn("description", schema) |
| 33 | self.assertIn("input_schema", schema) |
| 34 | |
| 35 | def test_get_tool(self): |
| 36 | registry = ToolRegistry.default() |
| 37 | self.assertIsNotNone(registry.get("bash")) |
| 38 | self.assertIsNone(registry.get("nonexistent")) |
| 39 | |
| 40 | |
| 41 | class TestBashTool(unittest.TestCase): |
nothing calls this directly
no outgoing calls
no test coverage detected