summaryrefslogtreecommitdiff
path: root/tests/test_config/test_security.py
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-02-17 12:44:02 -0800
committerTheron Luhn <theron@luhn.com>2019-02-17 13:04:53 -0800
commita6234e4e19efab838b202d0935de0de92c2ee00f (patch)
tree845e7783fc091c139c75191e97daeea234567c4e /tests/test_config/test_security.py
parente47e7f457a6143dda28f9dd1674c53b1ece67f9d (diff)
downloadpyramid-a6234e4e19efab838b202d0935de0de92c2ee00f.tar.gz
pyramid-a6234e4e19efab838b202d0935de0de92c2ee00f.tar.bz2
pyramid-a6234e4e19efab838b202d0935de0de92c2ee00f.zip
Implement setting ISecurityPolicy in the configurator.
Diffstat (limited to 'tests/test_config/test_security.py')
-rw-r--r--tests/test_config/test_security.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_config/test_security.py b/tests/test_config/test_security.py
index 5ebd78f8d..3062ea154 100644
--- a/tests/test_config/test_security.py
+++ b/tests/test_config/test_security.py
@@ -11,6 +11,15 @@ class ConfiguratorSecurityMethodsTests(unittest.TestCase):
config = Configurator(*arg, **kw)
return config
+ def test_set_security_policy(self):
+ from pyramid.interfaces import ISecurityPolicy
+
+ config = self._makeOne()
+ policy = object()
+ config.set_security_policy(policy)
+ config.commit()
+ self.assertEqual(config.registry.getUtility(ISecurityPolicy), policy)
+
def test_set_authentication_policy_no_authz_policy(self):
config = self._makeOne()
policy = object()