diff options
author | Aarni Koskela <akx@iki.fi> | 2022-10-27 15:13:40 +0300 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2022-11-15 13:06:41 +0200 |
commit | 3824f60d97ea977c852d6e256b8a38e9d029e405 (patch) | |
tree | 0a05cff33bf027819dde6edf862fbd9eccc12a04 | |
parent | 88feeba03c2f891a31a86cbb24b210070aab1fdc (diff) | |
download | pysaml2-3824f60d97ea977c852d6e256b8a38e9d029e405.tar.gz |
Run autoflake --remove-all-unused-imports --ignore-init-module-imports + black + isort
58 files changed, 12 insertions, 117 deletions
diff --git a/example/idp2/idp.py b/example/idp2/idp.py index fd310a53..300e43a2 100755 --- a/example/idp2/idp.py +++ b/example/idp2/idp.py @@ -13,7 +13,6 @@ from urllib.parse import parse_qs from idp_user import EXTRA from idp_user import USERS from mako.lookup import TemplateLookup -import six from saml2 import BINDING_HTTP_ARTIFACT from saml2 import BINDING_HTTP_POST diff --git a/example/idp2_repoze/modules/login.mako.py b/example/idp2_repoze/modules/login.mako.py index abc10236..211fa37f 100644 --- a/example/idp2_repoze/modules/login.mako.py +++ b/example/idp2_repoze/modules/login.mako.py @@ -1,4 +1,4 @@ -from mako import runtime, filters, cache +from mako import cache, runtime UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict diff --git a/example/idp2_repoze/modules/root.mako.py b/example/idp2_repoze/modules/root.mako.py index 16eceec6..41199232 100644 --- a/example/idp2_repoze/modules/root.mako.py +++ b/example/idp2_repoze/modules/root.mako.py @@ -75,7 +75,6 @@ def render_css_link(context, path, media=""): __M_writer('" media="') __M_writer(unicode(media)) __M_writer('">\n') - pass # SOURCE LINE 6 __M_writer(" ") self.seen_css.add(path) diff --git a/example/sp-repoze/sp.py b/example/sp-repoze/sp.py index 7fd1dde5..109e40e7 100755 --- a/example/sp-repoze/sp.py +++ b/example/sp-repoze/sp.py @@ -3,16 +3,13 @@ import argparse import logging import os import re -import subprocess from Cookie import SimpleCookie import sp_conf -from sp_conf import CONFIG from urlparse import parse_qs from saml2 import BINDING_HTTP_REDIRECT from saml2 import time_util -from saml2.config import Config from saml2.httputil import NotFound from saml2.httputil import Redirect from saml2.httputil import Response @@ -20,8 +17,6 @@ from saml2.httputil import Unauthorized # from saml2.httputil import ServiceError from saml2.metadata import create_metadata_string -from saml2.metadata import entities_descriptor -from saml2.sigver import security_context logger = logging.getLogger("saml2.SP") diff --git a/example/sp-wsgi/sp.py b/example/sp-wsgi/sp.py index 0486a787..0540d71a 100755 --- a/example/sp-wsgi/sp.py +++ b/example/sp-wsgi/sp.py @@ -17,8 +17,6 @@ import sys from urllib.parse import parse_qs import xml.dom.minidom -import six - from saml2 import BINDING_HTTP_ARTIFACT from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT @@ -536,7 +534,6 @@ class SSO: idp_entity_id = _idp_entity_id except KeyError: logger.debug("No IdP entity ID in query: %s", query) - pass if not idp_entity_id: diff --git a/src/saml2/__init__.py b/src/saml2/__init__.py index 0e38e551..6259373c 100644 --- a/src/saml2/__init__.py +++ b/src/saml2/__init__.py @@ -136,8 +136,6 @@ def create_class_from_element_tree(target_class, tree, namespace=None, tag=None) class Error(Exception): """Exception class thrown by this module.""" - pass - class SAMLError(Exception): pass diff --git a/src/saml2/assertion.py b/src/saml2/assertion.py index 40ae7112..08c4f908 100644 --- a/src/saml2/assertion.py +++ b/src/saml2/assertion.py @@ -5,8 +5,6 @@ import logging import re from warnings import warn as _warn -import six - from saml2 import saml from saml2 import xmlenc from saml2.attribute_converter import ac_factory diff --git a/src/saml2/authn.py b/src/saml2/authn.py index 1ed41152..a7ef3355 100644 --- a/src/saml2/authn.py +++ b/src/saml2/authn.py @@ -4,8 +4,6 @@ from urllib.parse import parse_qs from urllib.parse import urlencode from urllib.parse import urlsplit -import six - from saml2 import SAMLError import saml2.cryptography.symmetric from saml2.httputil import Redirect diff --git a/src/saml2/cache.py b/src/saml2/cache.py index 172afe98..56351fe7 100644 --- a/src/saml2/cache.py +++ b/src/saml2/cache.py @@ -3,8 +3,6 @@ import logging import shelve -import six - from saml2 import SAMLError from saml2 import time_util from saml2.ident import code diff --git a/src/saml2/cert.py b/src/saml2/cert.py index 08f0bd25..247b9f56 100644 --- a/src/saml2/cert.py +++ b/src/saml2/cert.py @@ -8,7 +8,6 @@ from os.path import join from OpenSSL import crypto import dateutil.parser import pytz -import six import saml2.cryptography.pki diff --git a/src/saml2/client.py b/src/saml2/client.py index 018ae6ef..4f947954 100644 --- a/src/saml2/client.py +++ b/src/saml2/client.py @@ -1,6 +1,5 @@ # !/usr/bin/env python # -import six """Contains classes and functions that a SAML2.0 Service Provider (SP) may use diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py index 146ae45c..8b548c44 100644 --- a/src/saml2/client_base.py +++ b/src/saml2/client_base.py @@ -13,8 +13,6 @@ from urllib.parse import urlencode from urllib.parse import urlparse from warnings import warn as _warn -import six - import saml2 from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT diff --git a/src/saml2/entity.py b/src/saml2/entity.py index b56388d9..f826177e 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -5,7 +5,6 @@ from hashlib import sha1 import logging import requests -import six from saml2 import BINDING_HTTP_ARTIFACT from saml2 import BINDING_HTTP_POST @@ -674,7 +673,6 @@ class Entity(HTTPBase): return response except Exception as ex: exception = ex - pass if exception: raise exception return response diff --git a/src/saml2/httputil.py b/src/saml2/httputil.py index e0d9bd24..5ff1282d 100644 --- a/src/saml2/httputil.py +++ b/src/saml2/httputil.py @@ -7,8 +7,6 @@ import time from urllib.parse import parse_qs from urllib.parse import quote -import six - from saml2 import BINDING_HTTP_ARTIFACT from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT diff --git a/src/saml2/ident.py b/src/saml2/ident.py index d94dd756..3a05c1d8 100644 --- a/src/saml2/ident.py +++ b/src/saml2/ident.py @@ -5,8 +5,6 @@ import shelve from urllib.parse import quote from urllib.parse import unquote -import six - from saml2 import SAMLError from saml2.s_utils import PolicyError from saml2.s_utils import rndbytes diff --git a/src/saml2/mdie.py b/src/saml2/mdie.py index c5d30557..ae81d71f 100644 --- a/src/saml2/mdie.py +++ b/src/saml2/mdie.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import six from saml2 import ExtensionElement from saml2 import SamlBase diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py index 8dc9e636..95ab0945 100644 --- a/src/saml2/mdstore.py +++ b/src/saml2/mdstore.py @@ -12,7 +12,6 @@ import sys from warnings import warn as _warn import requests -import six from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT diff --git a/src/saml2/metadata.py b/src/saml2/metadata.py index 707e1d54..d87be05f 100644 --- a/src/saml2/metadata.py +++ b/src/saml2/metadata.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import six from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT diff --git a/src/saml2/mongo_store.py b/src/saml2/mongo_store.py index 230a0d09..23729237 100644 --- a/src/saml2/mongo_store.py +++ b/src/saml2/mongo_store.py @@ -6,7 +6,6 @@ from pymongo import MongoClient import pymongo.errors from pymongo.mongo_replica_set_client import MongoReplicaSetClient import pymongo.uri_parser -import six from saml2.eptid import Eptid from saml2.ident import IdentDB @@ -280,7 +279,6 @@ def _mdb_get_database(uri, **kwargs): # assume URI to be just the database name db_name = uri _conn = MongoClient() - pass else: if "replicaset" in _parsed_uri["options"]: connection_factory = MongoReplicaSetClient diff --git a/src/saml2/pack.py b/src/saml2/pack.py index f8328b5c..30b9cdf9 100644 --- a/src/saml2/pack.py +++ b/src/saml2/pack.py @@ -19,8 +19,6 @@ import logging from urllib.parse import urlencode from urllib.parse import urlparse -import six - import saml2 from saml2.s_utils import deflate_and_base64_encode from saml2.sigver import REQ_ORDER diff --git a/src/saml2/population.py b/src/saml2/population.py index 8c066d63..ff3928b4 100644 --- a/src/saml2/population.py +++ b/src/saml2/population.py @@ -1,7 +1,5 @@ import logging -import six - from saml2.cache import Cache diff --git a/src/saml2/request.py b/src/saml2/request.py index 6b8474e6..e013e058 100644 --- a/src/saml2/request.py +++ b/src/saml2/request.py @@ -254,15 +254,12 @@ class AuthzDecisionQuery(Request): def action(self): """Which action authorization is requested for""" - pass def evidence(self): """The evidence on which the decision is based""" - pass def resource(self): """On which resource the action is expected to occur""" - pass class NameIDMappingRequest(Request): diff --git a/src/saml2/response.py b/src/saml2/response.py index d6500336..7d51ce6d 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -3,8 +3,6 @@ import calendar import logging -import six - from saml2 import SAMLError from saml2 import class_name from saml2 import extension_elements_to_elements diff --git a/src/saml2/s2repoze/plugins/sp.py b/src/saml2/s2repoze/plugins/sp.py index e3d25bfe..9d107795 100644 --- a/src/saml2/s2repoze/plugins/sp.py +++ b/src/saml2/s2repoze/plugins/sp.py @@ -23,7 +23,6 @@ from repoze.who.interfaces import IAuthenticator from repoze.who.interfaces import IChallenger from repoze.who.interfaces import IIdentifier from repoze.who.interfaces import IMetadataProvider -import six from zope.interface import implementer from saml2 import BINDING_HTTP_POST @@ -219,7 +218,6 @@ class SAML2Plugin: break except KeyError: logger.debug("No IdP entity ID in query: %s", query) - pass if idp_entity_id is None: if len(idps) == 1: diff --git a/src/saml2/s_utils.py b/src/saml2/s_utils.py index 1df61572..e8fadfa1 100644 --- a/src/saml2/s_utils.py +++ b/src/saml2/s_utils.py @@ -10,8 +10,6 @@ import sys import traceback import zlib -import six - from saml2 import VERSION from saml2 import saml from saml2 import samlp diff --git a/src/saml2/saml.py b/src/saml2/saml.py index d3cca114..a2678b7b 100644 --- a/src/saml2/saml.py +++ b/src/saml2/saml.py @@ -18,8 +18,6 @@ import base64 from datetime import date from datetime import datetime -import six - import saml2 from saml2 import SamlBase from saml2 import xmldsig as ds diff --git a/src/saml2/server.py b/src/saml2/server.py index 153ea91b..8b557200 100644 --- a/src/saml2/server.py +++ b/src/saml2/server.py @@ -10,8 +10,6 @@ import logging import shelve import threading -import six - from saml2 import BINDING_HTTP_REDIRECT from saml2 import class_name from saml2 import element_to_extension_element diff --git a/src/saml2/sigver.py b/src/saml2/sigver.py index 06836cf6..cae27914 100644 --- a/src/saml2/sigver.py +++ b/src/saml2/sigver.py @@ -17,7 +17,6 @@ from time import mktime from uuid import uuid4 as gen_random_key import dateutil -import six # importlib.resources was introduced in python 3.7 @@ -110,8 +109,6 @@ class SignatureError(XmlsecError): class BadSignature(SigverError): """The signature is invalid.""" - pass - def get_pem_wrapped_unwrapped(cert): begin_cert = "-----BEGIN CERTIFICATE-----\n" @@ -1497,7 +1494,6 @@ class SecurityContext: break except XmlsecError as exc: logger.error("check_sig: %s", str(exc)) - pass except Exception as exc: logger.error("check_sig: %s", str(exc)) raise diff --git a/src/saml2/time_util.py b/src/saml2/time_util.py index 2ef2adb6..37cd2319 100644 --- a/src/saml2/time_util.py +++ b/src/saml2/time_util.py @@ -12,8 +12,6 @@ import re import sys import time -import six - TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" TIME_FORMAT_WITH_FRAGMENT = re.compile(r"^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d*)?Z?$") diff --git a/src/saml2/tools/parse_xsd2.py b/src/saml2/tools/parse_xsd2.py index ce9f433f..432f25a7 100644 --- a/src/saml2/tools/parse_xsd2.py +++ b/src/saml2/tools/parse_xsd2.py @@ -8,8 +8,6 @@ import sys import time import types -import six - __version__ = 0.5 diff --git a/src/saml2test/check.py b/src/saml2test/check.py index 726860ac..47ea170c 100644 --- a/src/saml2test/check.py +++ b/src/saml2test/check.py @@ -1,8 +1,6 @@ import inspect import json -import six - __author__ = "rolandh" diff --git a/src/saml2test/interaction.py b/src/saml2test/interaction.py index 6fe6424a..16378ffc 100644 --- a/src/saml2test/interaction.py +++ b/src/saml2test/interaction.py @@ -8,7 +8,6 @@ from mechanize import ParseResponseEx from mechanize._form import AmbiguityError from mechanize._form import ControlNotFoundError from mechanize._form import ListControl -import six from urlparse import urlparse diff --git a/src/saml2test/opfunc.py b/src/saml2test/opfunc.py index c46f614d..78096c2e 100644 --- a/src/saml2test/opfunc.py +++ b/src/saml2test/opfunc.py @@ -5,7 +5,6 @@ from mechanize import ParseResponseEx from mechanize._form import AmbiguityError from mechanize._form import ControlNotFoundError from mechanize._form import ListControl -import six from urlparse import urlparse diff --git a/src/saml2test/tool.py b/src/saml2test/tool.py index 7a2f8f0b..b0bbf66c 100644 --- a/src/saml2test/tool.py +++ b/src/saml2test/tool.py @@ -3,7 +3,6 @@ import sys import traceback import cookielib -import six from urlparse import parse_qs from saml2test import CheckError diff --git a/tests/_test_80_p11_backend.py b/tests/_test_80_p11_backend.py index c30cb1f6..07af1f47 100644 --- a/tests/_test_80_p11_backend.py +++ b/tests/_test_80_p11_backend.py @@ -17,7 +17,6 @@ import tempfile import traceback from pathutils import full_path -import pytest from saml2 import class_name from saml2 import saml diff --git a/tests/idp_test/target_idp.py b/tests/idp_test/target_idp.py index edb21689..7028eb4d 100755 --- a/tests/idp_test/target_idp.py +++ b/tests/idp_test/target_idp.py @@ -7,8 +7,6 @@ __author__ = "rolandh" import json from saml2 import xmldsig as ds -from saml2.saml import NAME_FORMAT_BASIC -from saml2.saml import NAME_FORMAT_UNSPECIFIED from saml2.saml import NAME_FORMAT_URI diff --git a/tests/otest_61_makemeta.py b/tests/otest_61_makemeta.py index 581f20dd..22a11776 100644 --- a/tests/otest_61_makemeta.py +++ b/tests/otest_61_makemeta.py @@ -2,7 +2,6 @@ import saml2 from saml2 import BINDING_HTTP_POST from saml2 import extension_elements_to_elements from saml2 import md -from saml2 import mdstore from saml2.attribute_converter import ac_factory from saml2.config import IdPConfig from saml2.config import SPConfig diff --git a/tests/sp_slo_redirect_conf.py b/tests/sp_slo_redirect_conf.py index fee16f7e..4499424b 100644 --- a/tests/sp_slo_redirect_conf.py +++ b/tests/sp_slo_redirect_conf.py @@ -2,8 +2,6 @@ from pathutils import full_path from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT -from saml2.saml import NAME_FORMAT_URI -from saml2.saml import NAMEID_FORMAT_PERSISTENT HOME = "http://lingon.catalogix.se:8087/" diff --git a/tests/test_00_xmldsig.py b/tests/test_00_xmldsig.py index 5f6ac2f3..c3cd1be8 100644 --- a/tests/test_00_xmldsig.py +++ b/tests/test_00_xmldsig.py @@ -9,9 +9,9 @@ import unittest try: - from xml.etree import ElementTree + pass except ImportError: - from elementtree import ElementTree + pass import ds_data diff --git a/tests/test_02_saml.py b/tests/test_02_saml.py index 7d5fccc6..f217fd04 100644 --- a/tests/test_02_saml.py +++ b/tests/test_02_saml.py @@ -6,9 +6,9 @@ __author__ = "roland.hedberg@adm.umu.se (Roland Hedberg)" try: - from xml.etree import ElementTree + pass except ImportError: - from elementtree import ElementTree + pass import ds_data from pytest import raises @@ -1100,7 +1100,6 @@ class TestEvidence: def testUsingTestData(self): """Test evidence_from_string() using test data""" # TODO: - pass class TestAuthzDecisionStatement: @@ -1125,7 +1124,6 @@ class TestAuthzDecisionStatement: def testUsingTestData(self): """Test authz_decision_statement_from_string() using test data""" # TODO: - pass class TestAdvice: @@ -1148,7 +1146,6 @@ class TestAdvice: def testUsingTestData(self): """Test advice_from_string() using test data""" # TODO: - pass class TestAssertion: @@ -1189,7 +1186,6 @@ class TestAssertion: def testUsingTestData(self): """Test assertion_from_string() using test data""" # TODO - pass if __name__ == "__main__": diff --git a/tests/test_03_saml2.py b/tests/test_03_saml2.py index 9fef73c5..20838792 100644 --- a/tests/test_03_saml2.py +++ b/tests/test_03_saml2.py @@ -9,7 +9,6 @@ from saml2 import create_class_from_xml_string from saml2 import make_vals from saml2 import md from saml2.saml import Attribute -from saml2.saml import AuthnContextClassRef from saml2.saml import Issuer from saml2.saml import NameID from saml2.saml import SubjectConfirmation @@ -18,12 +17,12 @@ from saml2.saml import SubjectLocality try: - from xml.etree import ElementTree as ElementTree + pass except ImportError: try: - import cElementTree as ElementTree + pass except ImportError: - from elementtree import ElementTree + pass from defusedxml.common import EntitiesForbidden diff --git a/tests/test_04_samlp.py b/tests/test_04_samlp.py index bb37834d..520ee91f 100644 --- a/tests/test_04_samlp.py +++ b/tests/test_04_samlp.py @@ -6,9 +6,9 @@ __author__ = "roland.hedberg@adm.umu.se (Roland Hedberg)" try: - from xml.etree import ElementTree + pass except ImportError: - from elementtree import ElementTree + pass import samlp_data @@ -57,7 +57,6 @@ class TestStatusDetail: def testAccessors(self): """Test for StatusDetail accessors""" # TODO: - pass class TestStatusMessage: @@ -67,7 +66,6 @@ class TestStatusMessage: def testAccessors(self): """Test for StatusMessage accessors""" # TODO: - pass class TestStatusCode: @@ -186,7 +184,6 @@ class TestResponse: def testUsingTestData(self): """Test for response_from_string() using test data""" # TODO: - pass class TestNameIDPolicy: diff --git a/tests/test_05_md.py b/tests/test_05_md.py index 46db5e8c..c69bb12e 100644 --- a/tests/test_05_md.py +++ b/tests/test_05_md.py @@ -5,13 +5,11 @@ __author__ = "roland.hedberg@umu.se (Roland Hedberg)" -import unittest - try: - from xml.etree import ElementTree + pass except ImportError: - from elementtree import ElementTree + pass import ds_data import md_data diff --git a/tests/test_12_s_utils.py b/tests/test_12_s_utils.py index 2b0e7147..f5d8e103 100644 --- a/tests/test_12_s_utils.py +++ b/tests/test_12_s_utils.py @@ -3,7 +3,6 @@ import base64 from pathutils import full_path -import six from saml2 import s_utils as utils from saml2 import saml diff --git a/tests/test_19_attribute_converter.py b/tests/test_19_attribute_converter.py index f1db43af..4f3a5fbc 100644 --- a/tests/test_19_attribute_converter.py +++ b/tests/test_19_attribute_converter.py @@ -10,11 +10,8 @@ from saml2.attribute_converter import AttributeConverterNOOP from saml2.attribute_converter import from_local from saml2.attribute_converter import to_local import saml2.attributemaps.saml_uri as saml_map -from saml2.saml import NAMEID_FORMAT_PERSISTENT -from saml2.saml import NameID from saml2.saml import attribute_from_string from saml2.saml import attribute_statement_from_string -from saml2.saml import name_id_from_string def _eq(l1, l2): diff --git a/tests/test_20_assertion.py b/tests/test_20_assertion.py index 7f63b19e..c40bde4b 100644 --- a/tests/test_20_assertion.py +++ b/tests/test_20_assertion.py @@ -1,5 +1,3 @@ -import copy - from pathutils import full_path from pytest import raises diff --git a/tests/test_30_mdstore_old.py b/tests/test_30_mdstore_old.py index 2d29cb4e..64c20d84 100644 --- a/tests/test_30_mdstore_old.py +++ b/tests/test_30_mdstore_old.py @@ -11,12 +11,9 @@ from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_SOAP from saml2 import config -from saml2 import md -from saml2 import saml from saml2 import sigver from saml2.attribute_converter import ac_factory from saml2.attribute_converter import d_to_local_name -from saml2.mdstore import MetaDataMDX from saml2.mdstore import MetadataStore from saml2.mdstore import locations from saml2.mdstore import name diff --git a/tests/test_31_config.py b/tests/test_31_config.py index 14a28a3d..c7741c46 100644 --- a/tests/test_31_config.py +++ b/tests/test_31_config.py @@ -1,14 +1,11 @@ #!/usr/bin/env python -import logging -import sys from pathutils import dotname from pathutils import full_path from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_SOAP -from saml2 import logger from saml2.authn_context import PASSWORDPROTECTEDTRANSPORT as AUTHN_PASSWORD_PROTECTED from saml2.authn_context import TIMESYNCTOKEN as AUTHN_TIME_SYNC_TOKEN from saml2.config import Config diff --git a/tests/test_37_entity_categories.py b/tests/test_37_entity_categories.py index da7b6f4f..10beb17d 100644 --- a/tests/test_37_entity_categories.py +++ b/tests/test_37_entity_categories.py @@ -11,7 +11,6 @@ from saml2.md import RequestedAttribute from saml2.mdie import to_dict from saml2.mdstore import MetadataStore from saml2.saml import NAME_FORMAT_URI -from saml2.saml import Attribute from saml2.server import Server diff --git a/tests/test_42_enc.py b/tests/test_42_enc.py index 63d73d82..8f15fe24 100644 --- a/tests/test_42_enc.py +++ b/tests/test_42_enc.py @@ -8,7 +8,6 @@ from saml2.authn_context import INTERNETPROTOCOLPASSWORD from saml2.server import Server from saml2.sigver import ASSERT_XPATH from saml2.sigver import CryptoBackendXmlSec1 -from saml2.sigver import EncryptError from saml2.sigver import pre_encrypt_assertion from saml2.sigver import pre_encryption_part diff --git a/tests/test_50_server.py b/tests/test_50_server.py index 5a3613d5..c593623c 100644 --- a/tests/test_50_server.py +++ b/tests/test_50_server.py @@ -20,7 +20,6 @@ from saml2 import extension_elements_to_elements from saml2 import s_utils from saml2 import saml from saml2 import samlp -from saml2 import sigver from saml2 import time_util from saml2.assertion import Policy from saml2.authn_context import INTERNETPROTOCOLPASSWORD diff --git a/tests/test_51_client.py b/tests/test_51_client.py index cbbc9977..9a1ff516 100644 --- a/tests/test_51_client.py +++ b/tests/test_51_client.py @@ -10,7 +10,6 @@ from fakeIDP import FakeIDP from fakeIDP import unpack_form from pathutils import full_path from pytest import raises -import six from saml2 import BINDING_HTTP_POST from saml2 import BINDING_HTTP_REDIRECT diff --git a/tests/test_65_authn_query.py b/tests/test_65_authn_query.py index ec8c443d..71c934c3 100644 --- a/tests/test_65_authn_query.py +++ b/tests/test_65_authn_query.py @@ -15,8 +15,6 @@ from saml2.saml import NAMEID_FORMAT_TRANSIENT from saml2.saml import NameID from saml2.saml import Subject from saml2.samlp import AuthnQuery -from saml2.samlp import AuthnRequest -from saml2.samlp import NameIDPolicy from saml2.server import Server diff --git a/tests/test_70_redirect_signing.py b/tests/test_70_redirect_signing.py index 72ac9f05..27b167b1 100644 --- a/tests/test_70_redirect_signing.py +++ b/tests/test_70_redirect_signing.py @@ -9,7 +9,6 @@ from saml2.config import SPConfig from saml2.pack import http_redirect_message from saml2.server import Server from saml2.sigver import SIG_RSA_SHA1 -from saml2.sigver import import_rsa_key_from_file from saml2.sigver import verify_redirect_signature diff --git a/tests/test_77_authn_context.py b/tests/test_77_authn_context.py index e8dc62a7..643149b8 100644 --- a/tests/test_77_authn_context.py +++ b/tests/test_77_authn_context.py @@ -20,11 +20,9 @@ from saml2.authn_context import AuthnBroker from saml2.authn_context import authn_context_class_ref from saml2.authn_context import authn_context_decl_from_extension_elements from saml2.authn_context import authn_context_factory -from saml2.authn_context import ppt from saml2.authn_context import pword from saml2.authn_context import requested_authn_context from saml2.saml import AuthnContext -from saml2.saml import AuthnContextClassRef from saml2.saml import authn_context_from_string from saml2.samlp import RequestedAuthnContext diff --git a/tests/test_83_md_extensions.py b/tests/test_83_md_extensions.py index 9f6186f0..db4e0863 100644 --- a/tests/test_83_md_extensions.py +++ b/tests/test_83_md_extensions.py @@ -1,4 +1,3 @@ -from saml2 import create_class_from_element_tree as parse_element_as from saml2 import create_class_from_xml_string as parse_str_as from saml2.config import Config from saml2.extension.sp_type import SPType diff --git a/tests/test_xmlsec1_key_data.py b/tests/test_xmlsec1_key_data.py index 414cb61e..e8e9de85 100644 --- a/tests/test_xmlsec1_key_data.py +++ b/tests/test_xmlsec1_key_data.py @@ -1,8 +1,6 @@ -from datetime import datetime from unittest.mock import Mock from unittest.mock import patch -from dateutil import parser from pathutils import dotname from pathutils import full_path from pytest import raises diff --git a/tests/test_xsw.py b/tests/test_xsw.py index 62d57cd3..5d6ca1ac 100644 --- a/tests/test_xsw.py +++ b/tests/test_xsw.py @@ -1,8 +1,6 @@ -from datetime import datetime from unittest.mock import Mock from unittest.mock import patch -from dateutil import parser from pathutils import dotname from pathutils import full_path from pytest import raises |