Add supported_enhancements

This commit is contained in:
Brad Warren 2017-08-24 15:18:40 -07:00
parent b92df1b71c
commit 00e28592b6
2 changed files with 12 additions and 6 deletions

View file

@ -142,6 +142,14 @@ class Installer(plugins_common.Plugin):
return set(self.get_config_var(var)
for var in ('mydomain', 'myhostname', 'myorigin',))
def supported_enhancements(self):
"""Returns a list of supported enhancements.
:rtype: list
"""
return []
def ensure_cf_var(self, var, ideal, also_acceptable):
"""
Ensure that existing postfix config @var is in the list of @acceptable
@ -258,12 +266,6 @@ class Installer(plugins_common.Plugin):
an error occurs during the enhancement.
"""
def supported_enhancements(self):
"""Returns a list of supported enhancements.
:returns: supported enhancements which should be a subset of
:const:`~letsencrypt.constants.ENHANCEMENTS`
:rtype: :class:`list` of :class:`str`
"""
def save(self, title=None, temporary=False):
"""Saves all changes to the configuration files.

View file

@ -84,6 +84,10 @@ class InstallerTest(certbot_test_util.TempDirTestCase):
self.assertTrue("fubard.org" in result)
self.assertTrue("mail.fubard.org" in result)
def test_supported_enhancements(self):
self.assertEqual(
self._create_prepared_installer().supported_enhancements(), [])
def test_get_config_var_success(self):
self.config.postfix_config_dir = None