Fixed some tests.
This commit is contained in:
@@ -224,4 +224,4 @@ def test_metadata_file():
|
||||
assert len(mds.keys()) == 560
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_metadata_file()
|
||||
test_swami_1()
|
||||
|
@@ -12,7 +12,7 @@ from saml2.sigver import SignatureError
|
||||
|
||||
FALSE_ASSERT_SIGNED = "saml_false_signed.xml"
|
||||
|
||||
TIMESLACK = 10000000 # Roughly +- 6 month
|
||||
TIMESLACK = 20000000 # Roughly +- 12 month
|
||||
|
||||
|
||||
def _eq(l1, l2):
|
||||
|
@@ -24,7 +24,6 @@ def test_construct_0():
|
||||
assert url == "http://example.com/saml/disco?entityID=https%3A%2F%2Fexample.com%2Fsaml%2Fsp.xml"
|
||||
|
||||
|
||||
|
||||
def test_construct_1():
|
||||
sp = Saml2Client(config_file=dotname("servera_conf"))
|
||||
url = sp.create_discovery_service_request("http://example.com/saml/disco",
|
||||
@@ -38,7 +37,7 @@ def test_construct_deconstruct_request():
|
||||
url = sp.create_discovery_service_request(
|
||||
"http://example.com/saml/disco",
|
||||
"https://example.com/saml/sp.xml",
|
||||
is_passive=True,
|
||||
isPassive=True,
|
||||
returnIDParam="foo",
|
||||
return_url="https://example.com/saml/sp/disc")
|
||||
|
||||
@@ -55,7 +54,7 @@ def test_construct_deconstruct_response():
|
||||
sp = Saml2Client(config_file=dotname("servera_conf"))
|
||||
url = sp.create_discovery_service_request("http://example.com/saml/disco",
|
||||
"https://example.com/saml/sp.xml",
|
||||
is_passive=True,
|
||||
isPassive=True,
|
||||
returnIDParam="foo",
|
||||
return_url="https://example.com/saml/sp/disc")
|
||||
ds = DiscoveryServer(config_file=dotname("disco_conf"))
|
||||
@@ -70,4 +69,4 @@ def test_construct_deconstruct_response():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_construct_deconstruct_response()
|
||||
test_construct_deconstruct_request()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from saml2.pack import http_redirect_message
|
||||
from saml2.sigver import verify_redirect_signature
|
||||
from saml2.sigver import import_rsa_key_from_file
|
||||
from saml2.sigver import RSA_SHA1
|
||||
from saml2.sigver import SIG_RSA_SHA1
|
||||
from saml2.server import Server
|
||||
from saml2 import BINDING_HTTP_REDIRECT
|
||||
from saml2.client import Saml2Client
|
||||
@@ -32,7 +32,8 @@ def test():
|
||||
key = import_rsa_key_from_file(sp.sec.key_file)
|
||||
|
||||
info = http_redirect_message(req, destination, relay_state="RS",
|
||||
typ="SAMLRequest", sigalg=RSA_SHA1, key=key)
|
||||
typ="SAMLRequest", sigalg=SIG_RSA_SHA1,
|
||||
key=key)
|
||||
|
||||
verified_ok = False
|
||||
|
||||
|
Reference in New Issue
Block a user