summaryrefslogtreecommitdiff
path: root/tests/test_31_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_31_config.py')
-rw-r--r--tests/test_31_config.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_31_config.py b/tests/test_31_config.py
index 623c944f..eb8480c6 100644
--- a/tests/test_31_config.py
+++ b/tests/test_31_config.py
@@ -68,6 +68,7 @@ sp2 = {
},
"authn_requests_signed": True,
"logout_requests_signed": True,
+ "force_authn": True,
}
},
#"xmlsec_binary" : "/opt/local/bin/xmlsec1",
@@ -408,5 +409,15 @@ def test_crypto_backend():
sec = security_context(idpc)
assert isinstance(sec.crypto, CryptoBackendXMLSecurity)
+def test_unset_force_authn():
+ cnf = SPConfig().load(sp1)
+ assert bool(cnf.getattr('force_authn', 'sp')) == False
+
+
+def test_set_force_authn():
+ cnf = SPConfig().load(sp2)
+ assert bool(cnf.getattr('force_authn', 'sp')) == True
+
+
if __name__ == "__main__":
test_crypto_backend()