(self, mock_opts, mock_theme, mock_restore, runner)
| 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") |
nothing calls this directly
no test coverage detected