@@ -816,47 +816,47 @@ def testAddSign(self):
816
816
self .assertIn ('<ds:SignatureValue>' , xml_authn_signed )
817
817
818
818
res = parseString (xml_authn_signed )
819
- ds_signature = res .firstChild .firstChild .nextSibling .nextSibling
819
+ ds_signature = res .firstChild .firstChild .nextSibling .nextSibling . nextSibling
820
820
self .assertEqual ('ds:Signature' , ds_signature .tagName )
821
821
822
822
xml_authn_dom = parseString (xml_authn )
823
823
xml_authn_signed_2 = OneLogin_Saml2_Utils .add_sign (xml_authn_dom , key , cert )
824
824
self .assertIn ('<ds:SignatureValue>' , xml_authn_signed_2 )
825
825
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
827
827
self .assertEqual ('ds:Signature' , ds_signature_2 .tagName )
828
828
829
829
xml_authn_signed_3 = OneLogin_Saml2_Utils .add_sign (xml_authn_dom .firstChild , key , cert )
830
830
self .assertIn ('<ds:SignatureValue>' , xml_authn_signed_3 )
831
831
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
833
833
self .assertEqual ('ds:Signature' , ds_signature_3 .tagName )
834
834
835
835
xml_authn_etree = etree .fromstring (xml_authn )
836
836
xml_authn_signed_4 = OneLogin_Saml2_Utils .add_sign (xml_authn_etree , key , cert )
837
837
self .assertIn ('<ds:SignatureValue>' , xml_authn_signed_4 )
838
838
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
840
840
self .assertEqual ('ds:Signature' , ds_signature_4 .tagName )
841
841
842
842
xml_authn_signed_5 = OneLogin_Saml2_Utils .add_sign (xml_authn_etree , key , cert )
843
843
self .assertIn ('<ds:SignatureValue>' , xml_authn_signed_5 )
844
844
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
846
846
self .assertEqual ('ds:Signature' , ds_signature_5 .tagName )
847
847
848
848
xml_logout_req = b64decode (self .file_contents (join (self .data_path , 'logout_requests' , 'logout_request.xml.base64' )))
849
849
xml_logout_req_signed = OneLogin_Saml2_Utils .add_sign (xml_logout_req , key , cert )
850
850
self .assertIn ('<ds:SignatureValue>' , xml_logout_req_signed )
851
851
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
853
853
self .assertEqual ('ds:Signature' , ds_signature_6 .tagName )
854
854
855
855
xml_logout_res = b64decode (self .file_contents (join (self .data_path , 'logout_responses' , 'logout_response.xml.base64' )))
856
856
xml_logout_res_signed = OneLogin_Saml2_Utils .add_sign (xml_logout_res , key , cert )
857
857
self .assertIn ('<ds:SignatureValue>' , xml_logout_res_signed )
858
858
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
860
860
self .assertEqual ('ds:Signature' , ds_signature_7 .tagName )
861
861
862
862
xml_metadata = self .file_contents (join (self .data_path , 'metadata' , 'metadata_settings1.xml' ))
0 commit comments