From b2ff1ed20f937f5bc192a662dd1f1c2a9a849a94 Mon Sep 17 00:00:00 2001 From: TheNavigat Date: Fri, 29 Jan 2016 18:43:23 +0200 Subject: [PATCH] Adding docstring to functions in storage.py --- letsencrypt/storage.py | 2 ++ letsencrypt/tests/renewer_test.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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)