Skip to content

Commit 5332811

Browse files
author
Roland Hedberg
committed
Editorial
1 parent a941140 commit 5332811

File tree

6 files changed

+26
-14
lines changed

6 files changed

+26
-14
lines changed

tests/idp_all_conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"debug": 1,
8787
"key_file": full_path("test.key"),
8888
"cert_file": full_path("test.pem"),
89-
"xmlsec_binary": None,
89+
"xmlsec_path": ["/usr/local/bin", "/opt/local/bin"],
9090
"metadata": {
9191
"local": [full_path("servera.xml"),
9292
full_path("vo_metadata.xml")],

tests/test_30_mdstore.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from saml2.mdstore import destinations
77
from saml2.mdstore import name
88

9-
from saml2 import md, sigver
9+
from saml2 import md
10+
from saml2 import sigver
1011
from saml2 import BINDING_SOAP
1112
from saml2 import BINDING_HTTP_REDIRECT
1213
from saml2 import BINDING_HTTP_POST

tests/test_37_entity_categories.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def test_filter_ava():
5151
})
5252

5353
ava = {"givenName": ["Derek"], "sn": ["Jeter"],
54-
"email": ["[email protected]", "[email protected]"], "c": ["USA"]}
54+
"mail": ["[email protected]", "[email protected]"], "c": ["USA"]}
5555

5656
ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
5757

58-
assert _eq(ava.keys(), ['email', 'givenName', 'sn', 'c'])
59-
assert _eq(ava["email"], ["[email protected]", "[email protected]"])
58+
assert _eq(ava.keys(), ['mail', 'givenName', 'sn', 'c'])
59+
assert _eq(ava["mail"], ["[email protected]", "[email protected]"])
6060

6161

6262
def test_filter_ava2():
@@ -69,7 +69,7 @@ def test_filter_ava2():
6969
})
7070

7171
ava = {"givenName": ["Derek"], "sn": ["Jeter"],
72-
"email": ["[email protected]"], "c": ["USA"],
72+
"mail": ["[email protected]"], "c": ["USA"],
7373
"eduPersonTargetedID": "foo!bar!xyz"}
7474

7575
ava = policy.filter(ava, "https://connect.sunet.se/shibboleth", MDS)
@@ -93,7 +93,7 @@ def test_filter_ava3():
9393
mds.imp({"local": [full_path("entity_cat_sfs_hei.xml")]})
9494

9595
ava = {"givenName": ["Derek"], "sn": ["Jeter"],
96-
"email": ["[email protected]"], "c": ["USA"],
96+
"mail": ["[email protected]"], "c": ["USA"],
9797
"eduPersonTargetedID": "foo!bar!xyz",
9898
"norEduPersonNIN": "19800101134"}
9999

@@ -106,7 +106,7 @@ def test_idp_policy_filter():
106106
idp = Server("idp_conf_ec")
107107

108108
ava = {"givenName": ["Derek"], "sn": ["Jeter"],
109-
"email": ["[email protected]"], "c": ["USA"],
109+
"mail": ["[email protected]"], "c": ["USA"],
110110
"eduPersonTargetedID": "foo!bar!xyz",
111111
"norEduPersonNIN": "19800101134"}
112112

tests/test_51_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,4 +427,9 @@ def test_post_sso(self):
427427
# if __name__ == "__main__":
428428
# tc = TestClient()
429429
# tc.setup_class()
430-
# tc.test_response()
430+
# tc.test_response()
431+
432+
if __name__ == "__main__":
433+
tc = TestClientWithDummy()
434+
tc.setup_class()
435+
tc.test_post_sso()

tests/test_66_name_id_mapping.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from saml2.samlp import NameIDPolicy
88
from saml2.samlp import NameIDMappingRequest
99

10+
1011
def test_base_request():
1112
sp = Saml2Client(config_file="servera_conf")
1213
idp = Server(config_file="idp_all_conf")
@@ -26,6 +27,7 @@ def test_base_request():
2627

2728
assert isinstance(nmr, NameIDMappingRequest)
2829

30+
2931
def test_request_response():
3032
sp = Saml2Client(config_file="servera_conf")
3133
idp = Server(config_file="idp_all_conf")
@@ -52,8 +54,8 @@ def test_request_response():
5254
in_response_to = req.message.id
5355
name_id = NameID(format=NAMEID_FORMAT_PERSISTENT, text="foobar")
5456

55-
idp_response = idp.create_name_id_mapping_response(name_id,
56-
in_response_to=in_response_to)
57+
idp_response = idp.create_name_id_mapping_response(
58+
name_id, in_response_to=in_response_to)
5759

5860
print idp_response
5961

tests/test_76_metadata_in_mdb.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# -*- coding: utf-8 -*-
2-
from saml2.mongo_store import export_mdstore_to_mongo_db, MetadataMDB
3-
from saml2.mdstore import MetadataStore, destinations, name
42

53
__author__ = 'rolandh'
64

7-
from saml2.attribute_converter import d_to_local_name, ac_factory
5+
from saml2.attribute_converter import d_to_local_name
6+
from saml2.attribute_converter import ac_factory
7+
from saml2.mongo_store import export_mdstore_to_mongo_db
8+
from saml2.mongo_store import MetadataMDB
9+
from saml2.mdstore import MetadataStore
10+
from saml2.mdstore import destinations
11+
from saml2.mdstore import name
812

913
from saml2 import saml
1014
from saml2 import md

0 commit comments

Comments
 (0)