mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 16:57:36 +08:00
23 lines
663 B
Python
23 lines
663 B
Python
from unittest.mock import MagicMock, patch
|
|
|
|
|
|
class TestWorkspaceCLICommand:
|
|
def _make_cli(self):
|
|
from cli import HermesCLI
|
|
|
|
cli = HermesCLI.__new__(HermesCLI)
|
|
cli.config = {"quick_commands": {}}
|
|
cli.console = MagicMock()
|
|
cli.agent = None
|
|
cli.conversation_history = []
|
|
return cli
|
|
|
|
def test_process_command_dispatches_workspace_handler(self):
|
|
cli = self._make_cli()
|
|
|
|
with patch.object(cli, "_handle_workspace_command") as handler:
|
|
result = cli.process_command("/workspace status")
|
|
|
|
assert result is True
|
|
handler.assert_called_once_with("/workspace status")
|