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

Method test_chat_with_confirm_mode

tests/cli/test_main_coverage.py:1109–1123  ·  view source on GitHub ↗
(self, mock_opts, mock_theme, mock_restore, runner)

Source from the content-addressed store, hash-verified

1107 @patch("mcp_cli.main.set_theme")
1108 @patch("mcp_cli.main.process_options", return_value=_make_process_options_return())
1109 def test_chat_with_confirm_mode(self, mock_opts, mock_theme, mock_restore, runner):
1110 from mcp_cli.main import app
1111
1112 mm = _make_model_manager()
1113 with patch("mcp_cli.model_management.ModelManager", return_value=mm):
1114 with patch("asyncio.run") as mock_asyncio:
1115 mock_asyncio.side_effect = lambda coro: coro.close()
1116 runner.invoke(
1117 app,
1118 [
1119 "chat",
1120 "--confirm-mode",
1121 "never",
1122 ],
1123 )
1124
1125 @patch("mcp_cli.main.restore_terminal")
1126 @patch("mcp_cli.main.set_theme")

Callers

nothing calls this directly

Calls 2

_make_model_managerFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected