mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:05:31 +02:00
Satisfy pylint... sort of
This commit is contained in:
@@ -259,7 +259,7 @@ class Client(object):
|
||||
return lineage
|
||||
|
||||
def save_certificate(self, certr, chain_cert, cert_path, chain_path, fullchain_path):
|
||||
# pylint: disable=no-self-use
|
||||
# pylint: disable=no-self-use,too-many-locals
|
||||
"""Saves the certificate received from the ACME server.
|
||||
|
||||
:param certr: ACME "certificate" resource.
|
||||
@@ -295,6 +295,9 @@ class Client(object):
|
||||
logger.info("Server issued certificate; certificate written to %s",
|
||||
act_cert_path)
|
||||
|
||||
# TODO too long, refactor... either split this into another function
|
||||
# up one level (though it needs a copy of cert_pem) or find a way to
|
||||
# reuse machinery from storage.py
|
||||
if chain_cert:
|
||||
chain_file, act_chain_path = le_util.unique_file(chain_path, 0o644)
|
||||
# TODO: Except
|
||||
|
||||
@@ -180,7 +180,7 @@ class CLITest(unittest.TestCase):
|
||||
cert_path = '/etc/letsencrypt/live/foo.bar/cert.pem'
|
||||
chain_path = '/etc/letsencrypt/live/foo.bar/fullchain.pem'
|
||||
|
||||
mock_lineage = mock.MagicMock(cert=cert_path,fullchain=chain_path)
|
||||
mock_lineage = mock.MagicMock(cert=cert_path, fullchain=chain_path)
|
||||
mock_cert = mock.MagicMock(body='body')
|
||||
mock_key = mock.MagicMock(pem='pem_key')
|
||||
mock_renewal.return_value = mock_lineage
|
||||
|
||||
@@ -114,7 +114,7 @@ class ClientTest(unittest.TestCase):
|
||||
mock.sentinel.key, domains, self.config.csr_dir)
|
||||
self._check_obtain_certificate()
|
||||
|
||||
def test_save_certificate(self):
|
||||
def test_save_certificate(self): # pylint: disable=too-many-locals
|
||||
certs = ["matching_cert.pem", "cert.pem", "cert-san.pem"]
|
||||
tmp_path = tempfile.mkdtemp()
|
||||
os.chmod(tmp_path, 0o755) # TODO: really??
|
||||
|
||||
Reference in New Issue
Block a user