diff --git a/src/onelogin/saml2/metadata.py b/src/onelogin/saml2/metadata.py index 7561ab6e..c431be48 100644 --- a/src/onelogin/saml2/metadata.py +++ b/src/onelogin/saml2/metadata.py @@ -268,7 +268,7 @@ def add_x509_key_descriptors(metadata, cert=None, add_encryption=True): sp_sso_descriptor = entity_descriptor.getElementsByTagName('md:SPSSODescriptor')[0] sp_sso_descriptor.insertBefore(key_descriptor.cloneNode(True), sp_sso_descriptor.firstChild) - if add_encryption: + if add_encryption: sp_sso_descriptor.insertBefore(key_descriptor.cloneNode(True), sp_sso_descriptor.firstChild) signing = xml.getElementsByTagName('md:KeyDescriptor')[0] diff --git a/tests/pep8.rc b/tests/pep8.rc index b60901e4..910e1eaa 100644 --- a/tests/pep8.rc +++ b/tests/pep8.rc @@ -1,3 +1,3 @@ [pep8] -ignore = E501 -max-line-length = 160 \ No newline at end of file +ignore = E501, E731 +max-line-length = 160 diff --git a/tests/src/OneLogin/saml2_tests/utils_test.py b/tests/src/OneLogin/saml2_tests/utils_test.py index 459b0996..82dded99 100644 --- a/tests/src/OneLogin/saml2_tests/utils_test.py +++ b/tests/src/OneLogin/saml2_tests/utils_test.py @@ -655,11 +655,11 @@ def testDeleteLocalSession(self): OneLogin_Saml2_Utils.delete_local_session() self.assertEqual(1, local_session_test) - dscb = lambda: self.session_cear() + dscb = lambda: self.session_clear() OneLogin_Saml2_Utils.delete_local_session(dscb) self.assertEqual(0, local_session_test) - def session_cear(self): + def session_clear(self): """ Auxiliar method to test the delete_local_session method of the OneLogin_Saml2_Utils """