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

Method test_chat_invalid_provider

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

Source from the content-addressed store, hash-verified

1057 @patch("mcp_cli.main.set_theme")
1058 @patch("mcp_cli.main.process_options", return_value=_make_process_options_return())
1059 def test_chat_invalid_provider(self, mock_opts, mock_theme, mock_restore, runner):
1060 from mcp_cli.main import app
1061
1062 mm = _make_model_manager()
1063 mm.validate_provider.return_value = False
1064 with patch("mcp_cli.model_management.ModelManager", return_value=mm):
1065 result = runner.invoke(
1066 app,
1067 [
1068 "chat",
1069 "--provider",
1070 "bogus_provider",
1071 ],
1072 )
1073 # Should exit due to invalid provider
1074 assert result.exit_code == 1
1075
1076 @patch("mcp_cli.main.restore_terminal")
1077 @patch("mcp_cli.main.set_theme")

Callers

nothing calls this directly

Calls 1

_make_model_managerFunction · 0.70

Tested by

no test coverage detected