From c02390d63b6e1f033195bc9d5eefa78daea7784d Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 23 Jul 2015 09:08:07 -0700 Subject: [PATCH] PEP8 --- lemur/certificates/service.py | 2 -- lemur/decorators.py | 2 +- lemur/plugins/lemur_aws/tests/test_iam.py | 3 --- lemur/tests/conf.py | 8 ++++---- lemur/tests/test_authorities.py | 2 -- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index 4ba00e0a..f1997344 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -6,8 +6,6 @@ .. moduleauthor:: Kevin Glisson """ import arrow -import string -import random from sqlalchemy import func, or_ from flask import g, current_app diff --git a/lemur/decorators.py b/lemur/decorators.py index bb37dcf4..70f8de6a 100644 --- a/lemur/decorators.py +++ b/lemur/decorators.py @@ -12,7 +12,7 @@ from functools import update_wrapper # this is only used for dev def crossdomain(origin=None, methods=None, headers=None, max_age=21600, attach_to_all=True, - automatic_options=True): + automatic_options=True): # pragma: no cover if methods is not None: methods = ', '.join(sorted(x.upper() for x in methods)) diff --git a/lemur/plugins/lemur_aws/tests/test_iam.py b/lemur/plugins/lemur_aws/tests/test_iam.py index fd461fb2..bc86feb7 100644 --- a/lemur/plugins/lemur_aws/tests/test_iam.py +++ b/lemur/plugins/lemur_aws/tests/test_iam.py @@ -1,10 +1,8 @@ -import pytest from moto import mock_iam, mock_sts from lemur.certificates.models import Certificate from lemur.tests.certs import EXTERNAL_VALID_STR, PRIVATE_KEY_STR -from lemur.tests.conftest import app # noqa def test_get_name_from_arn(): @@ -31,4 +29,3 @@ def test_get_cert_from_arn(app): upload_cert('123456789012', cert, PRIVATE_KEY_STR) body, chain = get_cert_from_arn('arn:aws:iam::123456789012:server-certificate/tttt2.netflixtest.net-NetflixInc-20150624-20150625') assert body.replace('\n', '') == EXTERNAL_VALID_STR.replace('\n', '') - diff --git a/lemur/tests/conf.py b/lemur/tests/conf.py index 98b518c7..30a0174f 100644 --- a/lemur/tests/conf.py +++ b/lemur/tests/conf.py @@ -54,12 +54,12 @@ LEMUR_INSTANCE_PROFILE = 'Lemur' # These will be dependent on which 3rd party that Lemur is # configured to use. -#CLOUDCA_URL = '' -#CLOUDCA_PEM_PATH = '' -#CLOUDCA_BUNDLE = '' +# CLOUDCA_URL = '' +# CLOUDCA_PEM_PATH = '' +# CLOUDCA_BUNDLE = '' # number of years to issue if not specified -#CLOUDCA_DEFAULT_VALIDITY = 2 +# CLOUDCA_DEFAULT_VALIDITY = 2 VERISIGN_URL = 'http://example.com' VERISIGN_PEM_PATH = '~/' diff --git a/lemur/tests/test_authorities.py b/lemur/tests/test_authorities.py index 5bab6124..8e29dbd2 100644 --- a/lemur/tests/test_authorities.py +++ b/lemur/tests/test_authorities.py @@ -148,5 +148,3 @@ def test_admin_authorities_delete(client): def test_admin_certificate_authorities_get(client): assert client.get(api.url_for(CertificateAuthority, certificate_id=1), headers=VALID_ADMIN_HEADER_TOKEN).status_code == 404 - -