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

Method __init__

tests/adapters/test_cli_adapter_coverage.py:32–53  ·  view source on GitHub ↗
(
        self,
        test_name: str = "mock",
        description: str = "Mock CLI command",
        aliases: list[str] | None = None,
        requires_ctx: bool = False,
        hidden: bool = False,
        parameters: list[CommandParameter] | None = None,
        help_text: str | None = None,
    )

Source from the content-addressed store, hash-verified

30 """Concrete mock command for CLI-mode testing."""
31
32 def __init__(
33 self,
34 test_name: str = "mock",
35 description: str = "Mock CLI command",
36 aliases: list[str] | None = None,
37 requires_ctx: bool = False,
38 hidden: bool = False,
39 parameters: list[CommandParameter] | None = None,
40 help_text: str | None = None,
41 ):
42 super().__init__()
43 self._name = test_name
44 self._description = description
45 self._modes = CommandMode.CLI
46 self._aliases = aliases or []
47 self._requires_context = requires_ctx
48 self._hidden = hidden
49 self._parameters = parameters or []
50 self._help_text = help_text
51 self.execute_mock = AsyncMock(
52 return_value=CommandResult(success=True, output="Mock executed")
53 )
54
55 @property
56 def name(self) -> str:

Callers 1

__init__Method · 0.45

Calls 1

CommandResultClass · 0.90

Tested by

no test coverage detected