MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_get_command

Method test_get_command

tests/commands/test_registry.py:128–139  ·  view source on GitHub ↗

Test getting a command.

(self)

Source from the content-addressed store, hash-verified

126 pass
127
128 def test_get_command(self):
129 """Test getting a command."""
130 cmd = DummyCommand(name="test_cmd")
131 self.registry.register(cmd)
132
133 # Get by name
134 result = self.registry.get("test_cmd")
135 assert result is cmd
136
137 # Get non-existent
138 result = self.registry.get("nonexistent")
139 assert result is None
140
141 def test_get_command_with_mode_filter(self):
142 """Test getting a command with mode filtering."""

Callers

nothing calls this directly

Calls 3

registerMethod · 0.80
DummyCommandClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected