summaryrefslogtreecommitdiff
path: root/tests/test_40_sigver.py
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2015-06-06 09:14:33 +0200
committerRoland Hedberg <roland.hedberg@adm.umu.se>2015-06-06 09:14:33 +0200
commitc4eac4878c6390859a081d4dc201136e59f2089a (patch)
treeb54374772e36c66eed1ed7388e4aad3ab88ab0d2 /tests/test_40_sigver.py
parent5003a5f588fa6ef6c2f43679f975635cb7eda6df (diff)
parentf412b2262db8c6bda32b2758e5ecb944ad598ecd (diff)
downloadpysaml2-c4eac4878c6390859a081d4dc201136e59f2089a.tar.gz
Merge pull request #224 from SpamapS/master
A plethora of python3 fixes
Diffstat (limited to 'tests/test_40_sigver.py')
-rw-r--r--tests/test_40_sigver.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_40_sigver.py b/tests/test_40_sigver.py
index 993532bd..5950c11e 100644
--- a/tests/test_40_sigver.py
+++ b/tests/test_40_sigver.py
@@ -303,10 +303,11 @@ class TestSecurity():
to_sign = [(class_name(self._assertion), self._assertion.id),
(class_name(response), response.id)]
- s_response = sigver.signed_instance_factory(response, self.sec, to_sign)
+ s_response = sigver.signed_instance_factory(response, self.sec,
+ to_sign)
print(s_response)
- res = self.sec.verify_signature("%s" % s_response,
+ res = self.sec.verify_signature(s_response,
node_name=class_name(samlp.Response()))
print(res)
@@ -331,7 +332,7 @@ class TestSecurity():
assert ci == self.sec.my_cert
- res = self.sec.verify_signature("%s" % s_response,
+ res = self.sec.verify_signature(s_response,
node_name=class_name(samlp.Response()))
assert res
@@ -362,7 +363,7 @@ class TestSecurity():
ci = "".join(sigver.cert_from_instance(ass)[0].split())
assert ci == self.sec.my_cert
- res = self.sec.verify_signature("%s" % s_assertion,
+ res = self.sec.verify_signature(s_assertion,
node_name=class_name(ass))
assert res
@@ -451,9 +452,9 @@ def test_xbox():
encrypted_assertion = EncryptedAssertion()
encrypted_assertion.add_extension_element(_ass0)
- _, pre = make_temp("%s" % pre_encryption_part(), decode=False)
+ _, pre = make_temp(str(pre_encryption_part()).encode('utf-8'), decode=False)
enctext = sec.crypto.encrypt(
- "%s" % encrypted_assertion, conf.cert_file, pre, "des-192",
+ str(encrypted_assertion), conf.cert_file, pre, "des-192",
'/*[local-name()="EncryptedAssertion"]/*[local-name()="Assertion"]')