@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
@mock.patch('certbot._internal.main.plug_sel.pick_installer')
def test_install_enhancement_not_supported(self, mock_inst, _rec):
    mock_inst.return_value = null.Installer(self.config, 'null')
    plugins = disco.PluginsRegistry.find_all()
    self.config.auto_hsts = True
    self.config.certname = 'nonexistent'
    self.assertRaises(errors.NotSupportedError, main.install, self.config, plugins)
@mock.patch('certbot._internal.main.plug_sel.record_chosen_plugins')
@mock.patch('certbot._internal.main.plug_sel.pick_installer')
def test_install_enhancement_not_supported(self, mock_inst, _rec):
    mock_inst.return_value = null.Installer(self.config, 'null')
    plugins = disco.PluginsRegistry.find_all()
    self.config.auto_hsts = True
    self.config.certname = 'nonexistent'
    self.assertRaises(errors.NotSupportedError, main.install, self.config, plugins)