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

Method __init__

tests/adapters/test_interactive_adapter.py:21–46  ·  view source on GitHub ↗
(self, test_name: str = "mock", requires_context: bool = False)

Source from the content-addressed store, hash-verified

19 """Mock command for testing."""
20
21 def __init__(self, test_name: str = "mock", requires_context: bool = False):
22 super().__init__()
23 self._name = test_name
24 self._description = f"Mock command: {test_name}"
25 self._modes = CommandMode.INTERACTIVE
26 self._aliases = ["m"]
27 self._parameters = [
28 CommandParameter(
29 name="option",
30 type=str,
31 help="Test option",
32 required=False,
33 ),
34 CommandParameter(
35 name="flag",
36 type=bool,
37 help="Test flag",
38 required=False,
39 is_flag=True,
40 ),
41 ]
42 self._requires_context = requires_context
43 self._help_text = None
44 self.execute_mock = AsyncMock(
45 return_value=CommandResult(success=True, output="Mock executed")
46 )
47
48 @property
49 def name(self) -> str:

Callers

nothing calls this directly

Calls 2

CommandParameterClass · 0.90
CommandResultClass · 0.90

Tested by

no test coverage detected