summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_20_assertion.py14
-rw-r--r--tests/test_31_config.py4
-rw-r--r--tests/test_40_sigver.py11
3 files changed, 20 insertions, 9 deletions
diff --git a/tests/test_20_assertion.py b/tests/test_20_assertion.py
index 4caa6c02..21ff1ff1 100644
--- a/tests/test_20_assertion.py
+++ b/tests/test_20_assertion.py
@@ -193,7 +193,7 @@ def test_filter_attribute_value_assertions_0(AVA):
})
ava = filter_attribute_value_assertions(AVA[3].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert ava.keys() == ["surName"]
@@ -211,7 +211,7 @@ def test_filter_attribute_value_assertions_1(AVA):
})
ava = filter_attribute_value_assertions(AVA[0].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert _eq(ava.keys(), ["givenName", "surName"])
@@ -219,7 +219,7 @@ def test_filter_attribute_value_assertions_1(AVA):
assert ava["givenName"] == ["Derek"]
ava = filter_attribute_value_assertions(AVA[1].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert _eq(ava.keys(), ["surName"])
@@ -236,20 +236,20 @@ def test_filter_attribute_value_assertions_2(AVA):
})
ava = filter_attribute_value_assertions(AVA[0].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert _eq(ava.keys(), [])
ava = filter_attribute_value_assertions(AVA[1].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert _eq(ava.keys(), ["givenName"])
assert ava["givenName"] == ["Ryan"]
ava = filter_attribute_value_assertions(AVA[3].copy(),
- p.get_attribute_restriction(""))
+ p.get_attribute_restrictions(""))
print ava
assert _eq(ava.keys(), ["givenName"])
@@ -797,4 +797,4 @@ def test_assertion_with_authn_instant():
if __name__ == "__main__":
- test_assertion_with_authn_instant() \ No newline at end of file
+ test_assertion_2() \ No newline at end of file
diff --git a/tests/test_31_config.py b/tests/test_31_config.py
index e8c2c144..043fa121 100644
--- a/tests/test_31_config.py
+++ b/tests/test_31_config.py
@@ -238,7 +238,7 @@ def test_idp_1():
assert c.endpoint("single_sign_on_service")[0] == 'http://localhost:8088/'
attribute_restrictions = c.getattr("policy",
- "idp").get_attribute_restriction("")
+ "idp").get_attribute_restrictions("")
assert attribute_restrictions["edupersonaffiliation"][0].match("staff")
@@ -253,7 +253,7 @@ def test_idp_2():
BINDING_HTTP_REDIRECT) == ["http://localhost:8088/"]
attribute_restrictions = c.getattr("policy",
- "idp").get_attribute_restriction("")
+ "idp").get_attribute_restrictions("")
assert attribute_restrictions["edupersonaffiliation"][0].match("staff")
diff --git a/tests/test_40_sigver.py b/tests/test_40_sigver.py
index a5a99057..3862b626 100644
--- a/tests/test_40_sigver.py
+++ b/tests/test_40_sigver.py
@@ -83,6 +83,7 @@ def test_cert_from_instance_ssp():
print str(decoder.decode(der)).replace('.', "\n.")
assert decoder.decode(der)
+
class FakeConfig():
"""
Configuration parameters for signature validation test cases.
@@ -94,6 +95,12 @@ class FakeConfig():
cert_file = PUB_KEY
key_file = PRIV_KEY
debug = False
+ cert_handler_extra_class = None
+ generate_cert_info = False
+ tmp_cert_file = None
+ tmp_key_file = None
+ validate_certificate = False
+
class TestSecurity():
@@ -418,3 +425,7 @@ class TestSecurityMetadata():
item = self.sec.check_signature(sass, class_name(sass), sign_ass)
assert isinstance(item, saml.Assertion)
+
+if __name__ == "__main__":
+ t = TestSecurity()
+ t.setup_class()