Skip to content

Commit 53f6f57

Browse files
committed
p3 compatibility issue
1 parent bf1d530 commit 53f6f57

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/src/OneLogin/saml2_tests/response_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ def testReturnNameId(self):
121121
response_8.get_nameid()
122122
self.assertTrue(False)
123123
except Exception as e:
124-
self.assertIn('The SPNameQualifier value mistmatch the SP entityID value.', e.message)
124+
self.assertIn('The SPNameQualifier value mistmatch the SP entityID value.', str(e))
125125

126126
xml_6 = self.file_contents(join(self.data_path, 'responses', 'invalids', 'empty_nameid.xml.base64'))
127127
response_9 = OneLogin_Saml2_Response(settings, xml_6)
128128
try:
129129
response_9.get_nameid()
130130
self.assertTrue(False)
131131
except Exception as e:
132-
self.assertIn('An empty NameID value found', e.message)
132+
self.assertIn('An empty NameID value found', str(e))
133133

134134
def testGetNameIdData(self):
135135
"""
@@ -216,7 +216,7 @@ def testGetNameIdData(self):
216216
response_7.get_nameid_data()
217217
self.assertTrue(False)
218218
except Exception as e:
219-
self.assertIn('Not NameID found in the assertion of the Response', e.message)
219+
self.assertIn('Not NameID found in the assertion of the Response', str(e))
220220

221221
json_settings['strict'] = True
222222
settings = OneLogin_Saml2_Settings(json_settings)
@@ -227,15 +227,15 @@ def testGetNameIdData(self):
227227
response_8.get_nameid_data()
228228
self.assertTrue(False)
229229
except Exception as e:
230-
self.assertIn('The SPNameQualifier value mistmatch the SP entityID value.', e.message)
230+
self.assertIn('The SPNameQualifier value mistmatch the SP entityID value.', str(e))
231231

232232
xml_6 = self.file_contents(join(self.data_path, 'responses', 'invalids', 'empty_nameid.xml.base64'))
233233
response_9 = OneLogin_Saml2_Response(settings, xml_6)
234234
try:
235235
response_9.get_nameid_data()
236236
self.assertTrue(False)
237237
except Exception as e:
238-
self.assertIn('An empty NameID value found', e.message)
238+
self.assertIn('An empty NameID value found', str(e))
239239

240240
def testCheckStatus(self):
241241
"""
@@ -377,14 +377,14 @@ def testGetIssuers(self):
377377
try:
378378
response_4.get_issuers()
379379
except Exception as e:
380-
self.assertIn('Issuer of the Response not found or multiple.', e.message)
380+
self.assertIn('Issuer of the Response not found or multiple.', str(e))
381381

382382
xml_5 = self.file_contents(join(self.data_path, 'responses', 'invalids', 'no_issuer_assertion.xml.base64'))
383383
response_5 = OneLogin_Saml2_Response(settings, xml_5)
384384
try:
385385
response_5.get_issuers()
386386
except Exception as e:
387-
self.assertIn('Issuer of the Assertion not found or multiple.', e.message)
387+
self.assertIn('Issuer of the Assertion not found or multiple.', str(e))
388388

389389
def testGetSessionIndex(self):
390390
"""
@@ -695,7 +695,7 @@ def testIsInValidDuplicatedAttrs(self):
695695
response.get_attributes()
696696
self.assertFalse(True)
697697
except Exception as e:
698-
self.assertEqual('Found an Attribute element with duplicated Name', e.message)
698+
self.assertEqual('Found an Attribute element with duplicated Name', str(e))
699699

700700
def testIsInValidDestination(self):
701701
"""

0 commit comments

Comments
 (0)