Skip to content

Commit 12844c2

Browse files
author
Roland Hedberg
committed
Fixed some tests.
1 parent e95f6a9 commit 12844c2

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

tests/test_30_mdstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,4 @@ def test_metadata_file():
224224
assert len(mds.keys()) == 560
225225

226226
if __name__ == "__main__":
227-
test_metadata_file()
227+
test_swami_1()

tests/test_41_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
FALSE_ASSERT_SIGNED = "saml_false_signed.xml"
1414

15-
TIMESLACK = 10000000 # Roughly +- 6 month
15+
TIMESLACK = 20000000 # Roughly +- 12 month
1616

1717

1818
def _eq(l1, l2):

tests/test_69_discovery.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def test_construct_0():
2424
assert url == "http://example.com/saml/disco?entityID=https%3A%2F%2Fexample.com%2Fsaml%2Fsp.xml"
2525

2626

27-
2827
def test_construct_1():
2928
sp = Saml2Client(config_file=dotname("servera_conf"))
3029
url = sp.create_discovery_service_request("http://example.com/saml/disco",
@@ -38,7 +37,7 @@ def test_construct_deconstruct_request():
3837
url = sp.create_discovery_service_request(
3938
"http://example.com/saml/disco",
4039
"https://example.com/saml/sp.xml",
41-
is_passive=True,
40+
isPassive=True,
4241
returnIDParam="foo",
4342
return_url="https://example.com/saml/sp/disc")
4443

@@ -55,7 +54,7 @@ def test_construct_deconstruct_response():
5554
sp = Saml2Client(config_file=dotname("servera_conf"))
5655
url = sp.create_discovery_service_request("http://example.com/saml/disco",
5756
"https://example.com/saml/sp.xml",
58-
is_passive=True,
57+
isPassive=True,
5958
returnIDParam="foo",
6059
return_url="https://example.com/saml/sp/disc")
6160
ds = DiscoveryServer(config_file=dotname("disco_conf"))
@@ -70,4 +69,4 @@ def test_construct_deconstruct_response():
7069

7170

7271
if __name__ == "__main__":
73-
test_construct_deconstruct_response()
72+
test_construct_deconstruct_request()

tests/test_70_redirect_signing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from saml2.pack import http_redirect_message
22
from saml2.sigver import verify_redirect_signature
33
from saml2.sigver import import_rsa_key_from_file
4-
from saml2.sigver import RSA_SHA1
4+
from saml2.sigver import SIG_RSA_SHA1
55
from saml2.server import Server
66
from saml2 import BINDING_HTTP_REDIRECT
77
from saml2.client import Saml2Client
@@ -32,7 +32,8 @@ def test():
3232
key = import_rsa_key_from_file(sp.sec.key_file)
3333

3434
info = http_redirect_message(req, destination, relay_state="RS",
35-
typ="SAMLRequest", sigalg=RSA_SHA1, key=key)
35+
typ="SAMLRequest", sigalg=SIG_RSA_SHA1,
36+
key=key)
3637

3738
verified_ok = False
3839

0 commit comments

Comments
 (0)