From 1a02740b67977451bb83e0258d7a25764853c77f Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 29 Jun 2018 15:24:31 -0700 Subject: [PATCH] reformat code (noop) --- lemur/dns_providers/schemas.py | 4 ++-- lemur/dns_providers/service.py | 1 + lemur/dns_providers/views.py | 1 + lemur/plugins/lemur_acme/plugin.py | 6 +++--- lemur/plugins/lemur_acme/tests/test_acme.py | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lemur/dns_providers/schemas.py b/lemur/dns_providers/schemas.py index d871b8ef..05b6471d 100644 --- a/lemur/dns_providers/schemas.py +++ b/lemur/dns_providers/schemas.py @@ -1,8 +1,8 @@ +from marshmallow import fields + from lemur.common.fields import ArrowDateTime from lemur.common.schema import LemurInputSchema, LemurOutputSchema -from marshmallow import fields - class DnsProvidersNestedOutputSchema(LemurOutputSchema): __envelope__ = False diff --git a/lemur/dns_providers/service.py b/lemur/dns_providers/service.py index 442b2c31..c96b864a 100644 --- a/lemur/dns_providers/service.py +++ b/lemur/dns_providers/service.py @@ -1,6 +1,7 @@ import json from flask import current_app + from lemur import database from lemur.dns_providers.models import DnsProvider diff --git a/lemur/dns_providers/views.py b/lemur/dns_providers/views.py index b9543034..1f5b3164 100644 --- a/lemur/dns_providers/views.py +++ b/lemur/dns_providers/views.py @@ -21,6 +21,7 @@ api = Api(mod) class DnsProvidersList(AuthenticatedResource): """ Defines the 'dns_providers' endpoint """ + def __init__(self): self.reqparse = reqparse.RequestParser() super(DnsProvidersList, self).__init__() diff --git a/lemur/plugins/lemur_acme/plugin.py b/lemur/plugins/lemur_acme/plugin.py index 43f5244b..f472a965 100644 --- a/lemur/plugins/lemur_acme/plugin.py +++ b/lemur/plugins/lemur_acme/plugin.py @@ -19,8 +19,8 @@ import OpenSSL.crypto import josepy as jose from acme import challenges, messages from acme.client import BackwardsCompatibleClientV2, ClientNetwork -from acme.messages import Error as AcmeError from acme.errors import PollError, WildcardUnsupportedError +from acme.messages import Error as AcmeError from botocore.exceptions import ClientError from flask import current_app @@ -121,8 +121,8 @@ def request_certificate(acme_client, authorizations, csr, order): raise pem_certificate = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, - OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, - orderr.fullchain_pem)).decode() + OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, + orderr.fullchain_pem)).decode() pem_certificate_chain = orderr.fullchain_pem[len(pem_certificate):].lstrip() current_app.logger.debug("{0} {1}".format(type(pem_certificate), type(pem_certificate_chain))) diff --git a/lemur/plugins/lemur_acme/tests/test_acme.py b/lemur/plugins/lemur_acme/tests/test_acme.py index f8b58f46..2a358a63 100644 --- a/lemur/plugins/lemur_acme/tests/test_acme.py +++ b/lemur/plugins/lemur_acme/tests/test_acme.py @@ -281,7 +281,8 @@ class TestAcme(unittest.TestCase): @patch('lemur.plugins.lemur_acme.plugin.finalize_authorizations') @patch('lemur.plugins.lemur_acme.plugin.request_certificate') @patch('lemur.plugins.lemur_acme.plugin.authorization_service') - def test_create_certificate(self, mock_authorization_service, mock_request_certificate, mock_finalize_authorizations, mock_get_authorizations, + def test_create_certificate(self, mock_authorization_service, mock_request_certificate, + mock_finalize_authorizations, mock_get_authorizations, mock_current_app, mock_dns_provider_service, mock_acme): provider = plugin.ACMEIssuerPlugin() mock_authority = Mock()