diff --git a/letsencrypt/storage.py b/letsencrypt/storage.py index 9b2b1705a..e41805459 100644 --- a/letsencrypt/storage.py +++ b/letsencrypt/storage.py @@ -131,7 +131,9 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes self._check_symlinks() def _check_symlinks(self): + """Raises an exception if a symlink doesn't exist""" def check(link): + """Checks if symlink points to a file that exists""" return os.path.exists(os.path.realpath(link)) for kind in ALL_FOUR: if not check(getattr(self, kind)): diff --git a/letsencrypt/tests/renewer_test.py b/letsencrypt/tests/renewer_test.py index 4d217cba4..3c8e3cb95 100644 --- a/letsencrypt/tests/renewer_test.py +++ b/letsencrypt/tests/renewer_test.py @@ -76,7 +76,7 @@ class BaseRenewableCertTest(unittest.TestCase): junk.close() self.defaults = configobj.ConfigObj() - + with mock.patch("letsencrypt.storage.RenewableCert._check_symlinks") as check: check.return_value = True self.test_rc = storage.RenewableCert(config.filename, self.cli_config)