summaryrefslogtreecommitdiff
path: root/tests/test_predicates.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2019-12-26 12:52:03 -0600
committerGitHub <noreply@github.com>2019-12-26 12:52:03 -0600
commit9e61a82458187abdd1747bbd8c38c6089b80b3ab (patch)
tree186792f43eef99b67eaa561ffa1993180ec45271 /tests/test_predicates.py
parent323cfbb45e6ee4b7462bbea9dcaa4e8258dd74f6 (diff)
parent1631386fe2d8ea0f7419812b9cab381c668d2ebb (diff)
downloadpyramid-9e61a82458187abdd1747bbd8c38c6089b80b3ab.tar.gz
pyramid-9e61a82458187abdd1747bbd8c38c6089b80b3ab.tar.bz2
pyramid-9e61a82458187abdd1747bbd8c38c6089b80b3ab.zip
Merge pull request #3550 from mmerickel/moar-security-policy
security policy docs and legacy policy improvements
Diffstat (limited to 'tests/test_predicates.py')
-rw-r--r--tests/test_predicates.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_predicates.py b/tests/test_predicates.py
index 4029faf9d..c0a6c59ec 100644
--- a/tests/test_predicates.py
+++ b/tests/test_predicates.py
@@ -454,8 +454,9 @@ class Test_EffectivePrincipalsPredicate(unittest.TestCase):
return EffectivePrincipalsPredicate(val, config)
def _testing_authn_policy(self, userid, groupids=tuple()):
- from pyramid.interfaces import IAuthenticationPolicy
+ from pyramid.interfaces import IAuthenticationPolicy, ISecurityPolicy
from pyramid.security import Everyone, Authenticated
+ from pyramid.security import LegacySecurityPolicy
class DummyPolicy:
def effective_principals(self, request):
@@ -468,6 +469,7 @@ class Test_EffectivePrincipalsPredicate(unittest.TestCase):
registry = self.config.registry
registry.registerUtility(DummyPolicy(), IAuthenticationPolicy)
+ registry.registerUtility(LegacySecurityPolicy(), ISecurityPolicy)
def test_text(self):
inst = self._makeOne(('verna', 'fred'), None)