Skip to content

Commit bebf975

Browse files
committed
Fix test
1 parent 6d55884 commit bebf975

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/src/OneLogin/saml2_tests/utils_test.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -816,47 +816,47 @@ def testAddSign(self):
816816
self.assertIn('<ds:SignatureValue>', xml_authn_signed)
817817

818818
res = parseString(xml_authn_signed)
819-
ds_signature = res.firstChild.firstChild.nextSibling.nextSibling
819+
ds_signature = res.firstChild.firstChild.nextSibling.nextSibling.nextSibling
820820
self.assertEqual('ds:Signature', ds_signature.tagName)
821821

822822
xml_authn_dom = parseString(xml_authn)
823823
xml_authn_signed_2 = OneLogin_Saml2_Utils.add_sign(xml_authn_dom, key, cert)
824824
self.assertIn('<ds:SignatureValue>', xml_authn_signed_2)
825825
res_2 = parseString(xml_authn_signed_2)
826-
ds_signature_2 = res_2.firstChild.firstChild.nextSibling.nextSibling
826+
ds_signature_2 = res_2.firstChild.firstChild.nextSibling.nextSibling.nextSibling
827827
self.assertEqual('ds:Signature', ds_signature_2.tagName)
828828

829829
xml_authn_signed_3 = OneLogin_Saml2_Utils.add_sign(xml_authn_dom.firstChild, key, cert)
830830
self.assertIn('<ds:SignatureValue>', xml_authn_signed_3)
831831
res_3 = parseString(xml_authn_signed_3)
832-
ds_signature_3 = res_3.firstChild.firstChild.nextSibling.nextSibling
832+
ds_signature_3 = res_3.firstChild.firstChild.nextSibling.nextSibling.nextSibling
833833
self.assertEqual('ds:Signature', ds_signature_3.tagName)
834834

835835
xml_authn_etree = etree.fromstring(xml_authn)
836836
xml_authn_signed_4 = OneLogin_Saml2_Utils.add_sign(xml_authn_etree, key, cert)
837837
self.assertIn('<ds:SignatureValue>', xml_authn_signed_4)
838838
res_4 = parseString(xml_authn_signed_4)
839-
ds_signature_4 = res_4.firstChild.firstChild.nextSibling.nextSibling
839+
ds_signature_4 = res_4.firstChild.firstChild.nextSibling.nextSibling.nextSibling
840840
self.assertEqual('ds:Signature', ds_signature_4.tagName)
841841

842842
xml_authn_signed_5 = OneLogin_Saml2_Utils.add_sign(xml_authn_etree, key, cert)
843843
self.assertIn('<ds:SignatureValue>', xml_authn_signed_5)
844844
res_5 = parseString(xml_authn_signed_5)
845-
ds_signature_5 = res_5.firstChild.firstChild.nextSibling.nextSibling
845+
ds_signature_5 = res_5.firstChild.firstChild.nextSibling.nextSibling.nextSibling
846846
self.assertEqual('ds:Signature', ds_signature_5.tagName)
847847

848848
xml_logout_req = b64decode(self.file_contents(join(self.data_path, 'logout_requests', 'logout_request.xml.base64')))
849849
xml_logout_req_signed = OneLogin_Saml2_Utils.add_sign(xml_logout_req, key, cert)
850850
self.assertIn('<ds:SignatureValue>', xml_logout_req_signed)
851851
res_6 = parseString(xml_logout_req_signed)
852-
ds_signature_6 = res_6.firstChild.firstChild.nextSibling.nextSibling
852+
ds_signature_6 = res_6.firstChild.firstChild.nextSibling.nextSibling.nextSibling
853853
self.assertEqual('ds:Signature', ds_signature_6.tagName)
854854

855855
xml_logout_res = b64decode(self.file_contents(join(self.data_path, 'logout_responses', 'logout_response.xml.base64')))
856856
xml_logout_res_signed = OneLogin_Saml2_Utils.add_sign(xml_logout_res, key, cert)
857857
self.assertIn('<ds:SignatureValue>', xml_logout_res_signed)
858858
res_7 = parseString(xml_logout_res_signed)
859-
ds_signature_7 = res_7.firstChild.firstChild.nextSibling.nextSibling
859+
ds_signature_7 = res_7.firstChild.firstChild.nextSibling.nextSibling.nextSibling
860860
self.assertEqual('ds:Signature', ds_signature_7.tagName)
861861

862862
xml_metadata = self.file_contents(join(self.data_path, 'metadata', 'metadata_settings1.xml'))

0 commit comments

Comments
 (0)