MCPcopy Create free account
hub / github.com/bcefghj/miniClaudeCode / TestToolRegistry

Class TestToolRegistry

tests/test_tools.py:18–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class 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
41class TestBashTool(unittest.TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected