summaryrefslogtreecommitdiff
path: root/tests/test_security.py
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-12-14 20:17:36 -0800
committerTheron Luhn <theron@luhn.com>2019-12-14 20:17:36 -0800
commit2e06fa414412688dc3b7e0b422b0fc0b96ec882f (patch)
tree8acfecec6dd36eb8ed0763a93a7674ebc7fc140a /tests/test_security.py
parentcd0b92d10bfbb38068c216ce44dde9732fa127a8 (diff)
downloadpyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.gz
pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.tar.bz2
pyramid-2e06fa414412688dc3b7e0b422b0fc0b96ec882f.zip
Bring back identity into permits.
Diffstat (limited to 'tests/test_security.py')
-rw-r--r--tests/test_security.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_security.py b/tests/test_security.py
index 1c969e305..3896e008d 100644
--- a/tests/test_security.py
+++ b/tests/test_security.py
@@ -480,7 +480,10 @@ class TestLegacySecurityPolicy(unittest.TestCase):
_registerAuthenticationPolicy(request.registry, ['p1', 'p2'])
_registerAuthorizationPolicy(request.registry, True)
- self.assertTrue(policy.permits(request, request.context, 'permission'))
+ self.assertIs(
+ policy.permits(request, request.context, 'userid', 'permission'),
+ True,
+ )
_TEST_HEADER = 'X-Pyramid-Test'
@@ -501,7 +504,7 @@ class DummySecurityPolicy:
def authenticated_userid(self, request):
return self.result
- def permits(self, request, context, permission):
+ def permits(self, request, context, identity, permission):
return self.result
def remember(self, request, userid, **kw):