Skip to content

Commit e07d54c

Browse files
Fix tests and whitespace.
1 parent 21003d1 commit e07d54c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/onelogin/saml2/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def check_idp_settings(self, settings):
404404
nameid_enc = bool(security.get('nameIdEncrypted'))
405405

406406
if (want_assert_sign or want_mes_signed) and \
407-
not(exists_x509 or exists_fingerprint or exists_multix509sign):
407+
not (exists_x509 or exists_fingerprint or exists_multix509sign):
408408
errors.append('idp_cert_or_fingerprint_not_found_and_required')
409409
if nameid_enc and not (exists_x509 or exists_multix509enc):
410410
errors.append('idp_cert_not_found_and_required')

tests/src/OneLogin/saml2_tests/response_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def testReturnNameId(self):
110110
settings = OneLogin_Saml2_Settings(json_settings)
111111
xml = self.file_contents(join(self.data_path, 'responses', 'response1.xml.base64'))
112112
response = OneLogin_Saml2_Response(settings, xml)
113-
self.assertEqual('support@example.com', response.get_nameid())
113+
self.assertEqual('support@onelogin.com', response.get_nameid())
114114

115115
xml_2 = self.file_contents(join(self.data_path, 'responses', 'response_encrypted_nameid.xml.base64'))
116116
response_2 = OneLogin_Saml2_Response(settings, xml_2)
@@ -389,7 +389,7 @@ def testGetNameIdData(self):
389389
xml = self.file_contents(join(self.data_path, 'responses', 'response1.xml.base64'))
390390
response = OneLogin_Saml2_Response(settings, xml)
391391
expected_nameid_data = {
392-
'Value': 'support@example.com',
392+
'Value': 'support@onelogin.com',
393393
'Format': 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
394394
}
395395
nameid_data = response.get_nameid_data()
@@ -822,7 +822,7 @@ def testNodeTextAttack(self):
822822
attributes = response.get_attributes()
823823
nameid = response.get_nameid()
824824
self.assertEqual("smith", attributes.get('surname')[0])
825-
self.assertEqual('support@example.com', nameid)
825+
self.assertEqual('support@onelogin.com', nameid)
826826

827827
def testGetSessionNotOnOrAfter(self):
828828
"""

0 commit comments

Comments
 (0)