@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
@mock.patch('certbot._internal.cert_manager.lineage_for_certname')
@mock.patch('certbot._internal.main.display_ops.choose_values')
@mock.patch('certbot._internal.main._find_domains_or_certname')
def test_selection_question(self, mock_find, mock_choose, mock_lineage, _rec):
    mock_lineage.return_value = mock.MagicMock(chain_path='/tmp/nonexistent')
    mock_choose.return_value = ['example.com']
    mock_find.return_value = (None, None)
    with mock.patch('certbot._internal.main.plug_sel.pick_installer') as mock_pick:
        self._call(['enhance', '--redirect'])
        self.assertTrue(mock_pick.called)
        self.assertTrue(('enhancements' in mock_pick.call_args[0][3]))
@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
@mock.patch('certbot._internal.cert_manager.lineage_for_certname')
@mock.patch('certbot._internal.main.display_ops.choose_values')
@mock.patch('certbot._internal.main._find_domains_or_certname')
def test_selection_question(self, mock_find, mock_choose, mock_lineage, _rec):
    mock_lineage.return_value = mock.MagicMock(chain_path='/tmp/nonexistent')
    mock_choose.return_value = ['example.com']
    mock_find.return_value = (None, None)
    with mock.patch('certbot._internal.main.plug_sel.pick_installer') as mock_pick:
        self._call(['enhance', '--redirect'])
        self.assertTrue(mock_pick.called)
        self.assertTrue(('enhancements' in mock_pick.call_args[0][3]))