summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2019-12-14 18:02:31 -0600
committerTheron Luhn <theron@luhn.com>2019-12-14 18:16:55 -0600
commita7692dbc47a86c8fbf763d095bf567d7e28ab3ff (patch)
tree11074a572899fb8d09dc7a456f7b9bc6ead53384 /tests
parent4af6a51e7edfac4ec88b01f5be97d966742a8757 (diff)
downloadpyramid-a7692dbc47a86c8fbf763d095bf567d7e28ab3ff.tar.gz
pyramid-a7692dbc47a86c8fbf763d095bf567d7e28ab3ff.tar.bz2
pyramid-a7692dbc47a86c8fbf763d095bf567d7e28ab3ff.zip
Fix security policy integration tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/pkgs/securityapp/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pkgs/securityapp/__init__.py b/tests/pkgs/securityapp/__init__.py
index b869ab541..6c9025e7d 100644
--- a/tests/pkgs/securityapp/__init__.py
+++ b/tests/pkgs/securityapp/__init__.py
@@ -4,14 +4,14 @@ from pyramid.security import Allowed, Denied
class SecurityPolicy:
def identify(self, request):
- ...
+ raise NotImplementedError() # pragma: no cover
def authenticated_userid(self, request):
return request.environ.get('REMOTE_USER')
def permits(self, request, context, permission):
- identity = self.identify(request)
- if identity and permission == 'foo':
+ userid = self.authenticated_userid(request)
+ if userid and permission == 'foo':
return Allowed('')
else:
return Denied('')