Skip to content

Commit 7cee597

Browse files
committed
another compatibility issue with tests
1 parent 0726c4f commit 7cee597

5 files changed

Lines changed: 5 additions & 9 deletions

File tree

tests/src/OneLogin/saml2_tests/auth_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ def testLogoutNoSLO(self):
778778
exception = context.exception
779779
self.assertIn("The IdP does not support Single Log Out", str(exception))
780780

781-
782781
def testLogoutNameIDandSessionIndex(self):
783782
"""
784783
Tests the logout method of the OneLogin_Saml2_Auth class

tests/src/OneLogin/saml2_tests/logout_request_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def testGetNameIdData(self):
126126
exception = context.exception
127127
self.assertIn("Key is required in order to decrypt the NameID", str(exception))
128128

129-
130129
settings = OneLogin_Saml2_Settings(self.loadSettingsJSON())
131130
key = settings.get_sp_key()
132131
name_id_data_4 = OneLogin_Saml2_Logout_Request.get_nameid_data(request_2, key)

tests/src/OneLogin/saml2_tests/logout_response_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ def testConstructor(self):
5454
settings = OneLogin_Saml2_Settings(self.loadSettingsJSON())
5555
message = self.file_contents(join(self.data_path, 'logout_responses', 'logout_response_deflated.xml.base64'))
5656
response = OneLogin_Saml2_Logout_Response(settings, message)
57-
self.assertRegex(compat.to_string(OneLogin_Saml2_XML.to_string(response.document)),
58-
'<samlp:LogoutResponse')
57+
self.assertRegex(compat.to_string(OneLogin_Saml2_XML.to_string(response.document)), '<samlp:LogoutResponse')
5958

6059
def testCreateDeflatedSAMLLogoutResponseURLParameter(self):
6160
"""

tests/src/OneLogin/saml2_tests/response_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def testReturnNameId(self):
9393
response_5.get_nameid()
9494
self.assertTrue(False)
9595
except Exception as e:
96-
self.assertIn('Not NameID found in the assertion of the Response', e.message)
96+
self.assertIn('Not NameID found in the assertion of the Response', str(e))
9797

9898
json_settings['security']['wantNameId'] = False
9999
settings = OneLogin_Saml2_Settings(json_settings)
@@ -110,7 +110,7 @@ def testReturnNameId(self):
110110
response_7.get_nameid()
111111
self.assertTrue(False)
112112
except Exception as e:
113-
self.assertIn('Not NameID found in the assertion of the Response', e.message)
113+
self.assertIn('Not NameID found in the assertion of the Response', str(e))
114114

115115
def testGetNameIdData(self):
116116
"""
@@ -163,7 +163,7 @@ def testGetNameIdData(self):
163163
response_5.get_nameid_data()
164164
self.assertTrue(False)
165165
except Exception as e:
166-
self.assertIn('Not NameID found in the assertion of the Response', e.message)
166+
self.assertIn('Not NameID found in the assertion of the Response', str(e))
167167

168168
json_settings['security']['wantNameId'] = False
169169
settings = OneLogin_Saml2_Settings(json_settings)
@@ -180,7 +180,7 @@ def testGetNameIdData(self):
180180
response_7.get_nameid_data()
181181
self.assertTrue(False)
182182
except Exception as e:
183-
self.assertIn('Not NameID found in the assertion of the Response', e.message)
183+
self.assertIn('Not NameID found in the assertion of the Response', str(e))
184184

185185
def testCheckStatus(self):
186186
"""

tests/src/OneLogin/saml2_tests/xml_utils_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def testToString(self):
7373
exception = context.exception
7474
self.assertIn("unsupported type", str(exception))
7575

76-
7776
def testToElement(self):
7877
"""
7978
Tests the to_etree method of the OneLogin_Saml2_XML

0 commit comments

Comments
 (0)