@mock.patch('certbot._internal.main.plug_sel.choose_configurator_plugins')
@mock.patch('certbot._internal.main.display_ops.choose_values')
@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
def test_plugin_selection_error(self, _rec, mock_choose, mock_pick):
    mock_choose.return_value = ['example.com']
    mock_pick.return_value = (None, None)
    mock_pick.side_effect = errors.PluginSelectionError()
    mock_client = self._call(['enhance', '--hsts'])
    self.assertFalse(mock_client.enhance_config.called)
@mock.patch('certbot._internal.main.plug_sel.choose_configurator_plugins')
@mock.patch('certbot._internal.main.display_ops.choose_values')
@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
def test_plugin_selection_error(self, _rec, mock_choose, mock_pick):
    mock_choose.return_value = ['example.com']
    mock_pick.return_value = (None, None)
    mock_pick.side_effect = errors.PluginSelectionError()
    mock_client = self._call(['enhance', '--hsts'])
    self.assertFalse(mock_client.enhance_config.called)