summaryrefslogtreecommitdiff
path: root/tests/test_20_assertion.py
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2014-04-02 13:31:26 +0200
committerRoland Hedberg <roland.hedberg@adm.umu.se>2014-04-02 13:31:26 +0200
commitf4515696024b2680f751fe2395ea2a427ac137f3 (patch)
treee2e3c724655cb0f7115299128a2c699dc4855192 /tests/test_20_assertion.py
parent6a38f5ecee53de47b35713c31243bc2581eda8f5 (diff)
downloadpysaml2-f4515696024b2680f751fe2395ea2a427ac137f3.tar.gz
Editorial
Diffstat (limited to 'tests/test_20_assertion.py')
-rw-r--r--tests/test_20_assertion.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/test_20_assertion.py b/tests/test_20_assertion.py
index 5826d5fe..4c65438e 100644
--- a/tests/test_20_assertion.py
+++ b/tests/test_20_assertion.py
@@ -1,3 +1,4 @@
+# coding=utf-8
from saml2.authn_context import pword
from saml2.mdie import to_dict
from saml2 import md, assertion
@@ -75,7 +76,6 @@ def test_filter_on_attributes_1():
assert ava.keys() == ["serialNumber"]
assert ava["serialNumber"] == ["12345"]
-
# ----------------------------------------------------------------------
def test_lifetime_1():
@@ -255,6 +255,7 @@ def test_filter_attribute_value_assertions_2(AVA):
assert _eq(ava.keys(), ["givenName"])
assert ava["givenName"] == ["Roland"]
+
# ----------------------------------------------------------------------------
@@ -290,7 +291,9 @@ def test_assertion_1(AVA):
def test_assertion_2():
AVA = {'mail': u'roland.hedberg@adm.umu.se',
- 'eduPersonTargetedID': 'http://lingon.ladok.umu.se:8090/idp!http://lingon.ladok.umu.se:8088/sp!95e9ae91dbe62d35198fbbd5e1fb0976',
+ 'eduPersonTargetedID': 'http://lingon.ladok.umu'
+ '.se:8090/idp!http://lingon.ladok.umu'
+ '.se:8088/sp!95e9ae91dbe62d35198fbbd5e1fb0976',
'displayName': u'Roland Hedberg',
'uid': 'http://roland.hedberg.myopenid.com/'}
@@ -453,6 +456,7 @@ def test_filter_values_req_opt_2():
raises(MissingValue, "filter_on_attributes(ava, r, o)")
+
# ---------------------------------------------------------------------------
@@ -485,6 +489,7 @@ def test_filter_values_req_opt_4():
assert _eq(ava.keys(), ['givenName', 'sn'])
assert ava == {'givenName': ['Roland'], 'sn': ['Hedberg']}
+
# ---------------------------------------------------------------------------
@@ -706,7 +711,7 @@ ACD = pword.AuthenticationContextDeclaration(authn_method=authn_method)
def test_assertion_with_noop_attribute_conv():
- ava = {"urn:oid:2.5.4.4": "Roland", "urn:oid:2.5.4.42": "Hedberg" }
+ ava = {"urn:oid:2.5.4.4": "Roland", "urn:oid:2.5.4.42": "Hedberg"}
ast = Assertion(ava)
policy = Policy({
"default": {
@@ -719,7 +724,7 @@ def test_assertion_with_noop_attribute_conv():
issuer = Issuer(text="entityid", format=NAMEID_FORMAT_ENTITY)
msg = ast.construct("sp_entity_id", "in_response_to", "consumer_url",
name_id, [AttributeConverterNOOP(NAME_FORMAT_URI)],
- policy, issuer=issuer, authn_decl=ACD ,
+ policy, issuer=issuer, authn_decl=ACD,
authn_auth="authn_authn")
print msg
@@ -767,7 +772,7 @@ def test_assertion_with_zero_attributes():
issuer = Issuer(text="entityid", format=NAMEID_FORMAT_ENTITY)
msg = ast.construct("sp_entity_id", "in_response_to", "consumer_url",
name_id, [AttributeConverterNOOP(NAME_FORMAT_URI)],
- policy, issuer=issuer, authn_decl=ACD ,
+ policy, issuer=issuer, authn_decl=ACD,
authn_auth="authn_authn")
print msg