summaryrefslogtreecommitdiff
path: root/tests/test_50_server.py
diff options
context:
space:
mode:
authorHans Hörberg <hans.horberg@umu.se>2015-11-06 12:17:34 +0100
committerHans Hörberg <hans.horberg@umu.se>2015-11-06 12:17:34 +0100
commit3b84f65d849c2035636e1691ae0d35fe664640b9 (patch)
treece3477e5f6943edd84d646deb67705fcfff76ccd /tests/test_50_server.py
parent0f209eb5498ca948f654c2128d3b037d18b8cb17 (diff)
downloadpysaml2-3b84f65d849c2035636e1691ae0d35fe664640b9.tar.gz
Added the possibility to set signature and digest algorithm on all the functions I identified.
pysaml2 has a default value for sign and digest. To make it possible to always use the same algorithm this default value has been replaced with a singleton class. The first time the singleton class is instantiated the sign and digest algorithm will be set. After that it cannot be changed. A good place to setup this single class is in the server setup. Example: ds.DefaultSignature(ds.SIG_RSA_SHA512, ds.DIGEST_SHA512)
Diffstat (limited to 'tests/test_50_server.py')
-rw-r--r--tests/test_50_server.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_50_server.py b/tests/test_50_server.py
index c43d489b..09c3bb05 100644
--- a/tests/test_50_server.py
+++ b/tests/test_50_server.py
@@ -32,6 +32,7 @@ from saml2 import BINDING_HTTP_REDIRECT
from py.test import raises
from pathutils import full_path
+import saml2.xmldsig as ds
nid = NameID(name_qualifier="foo", format=NAMEID_FORMAT_TRANSIENT,
text="123456")
@@ -86,6 +87,7 @@ def generate_cert():
class TestServer1():
+
def setup_class(self):
self.server = Server("idp_conf")