File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -225,12 +225,13 @@ def test_make_vals_multi_dict(self):
225225 def test_to_string_nspair (self ):
226226 foo = saml2 .make_vals ("lions" , AttributeValue , part = True )
227227 txt = foo .to_string ().decode ('utf-8' )
228- nsstr = foo .to_string ({"saml " : saml .NAMESPACE }).decode ('utf-8' )
228+ nsstr = foo .to_string ({"saml2 " : saml .NAMESPACE }).decode ('utf-8' )
229229 assert nsstr != txt
230230 print (txt )
231231 print (nsstr )
232- assert "saml:AttributeValue" in nsstr
233- assert "saml:AttributeValue" not in txt
232+ assert "saml2:AttributeValue" in nsstr
233+ assert "saml2:AttributeValue" not in txt
234+ assert "saml:AttributeValue" in txt
234235
235236 def test_set_text_empty (self ):
236237 av = AttributeValue ()
Original file line number Diff line number Diff line change 1212
1313__author__ = 'roland'
1414
15- TMPL_NO_HEADER = """<xenc:EncryptedData xmlns:xenc ="http://www.w3.org/2001/04/xmlenc #" xmlns:ds ="http://www.w3.org/2000/09/xmldsig #" Id="{ed_id}" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" /><ds:KeyInfo><xenc:EncryptedKey Id="{ek_id}"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" /><ds:KeyInfo><ds:KeyName>my-rsa-key</ds:KeyName></ds:KeyInfo><xenc:CipherData><xenc:CipherValue /></xenc:CipherData></xenc:EncryptedKey></ds:KeyInfo><xenc:CipherData><xenc:CipherValue /></xenc:CipherData></xenc:EncryptedData>"""
15+ TMPL_NO_HEADER = """<xenc:EncryptedData xmlns:ds ="http://www.w3.org/2000/09/xmldsig #" xmlns:xenc ="http://www.w3.org/2001/04/xmlenc #" Id="{ed_id}" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" /><ds:KeyInfo><xenc:EncryptedKey Id="{ek_id}"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" /><ds:KeyInfo><ds:KeyName>my-rsa-key</ds:KeyName></ds:KeyInfo><xenc:CipherData><xenc:CipherValue /></xenc:CipherData></xenc:EncryptedKey></ds:KeyInfo><xenc:CipherData><xenc:CipherValue /></xenc:CipherData></xenc:EncryptedData>"""
1616TMPL = "<?xml version='1.0' encoding='UTF-8'?>\n %s" % TMPL_NO_HEADER
1717
1818IDENTITY = {"eduPersonAffiliation" : ["staff" , "member" ],
@@ -123,5 +123,6 @@ def test_enc2():
123123
124124 assert enc_resp
125125
126+
126127if __name__ == "__main__" :
127128 test_enc1 ()
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def test_nsprefix():
1313
1414 txt = "%s" % status_message
1515
16- assert "ns0 :StatusMessage" in txt
16+ assert "samlp :StatusMessage" in txt
1717
1818 status_message .register_prefix ({"saml2" : saml .NAMESPACE ,
1919 "saml2p" : samlp .NAMESPACE })
@@ -41,5 +41,6 @@ def test_nsprefix2():
4141 assert "saml2p:AuthnRequest" in txt
4242 assert "saml2:Issuer" in txt
4343
44+
4445if __name__ == "__main__" :
45- test_nsprefix2 ()
46+ test_nsprefix2 ()
You can’t perform that action at this time.
0 commit comments