summaryrefslogtreecommitdiff
path: root/tests/pkgs/forbiddenview
diff options
context:
space:
mode:
authorMichael Merickel <github@m.merickel.org>2018-10-15 09:56:42 -0500
committerGitHub <noreply@github.com>2018-10-15 09:56:42 -0500
commitbda1306749c62ef4f11cfe567ed7d56c8ad94240 (patch)
tree304c696c105ca15bbe0f13d96c79524974de768b /tests/pkgs/forbiddenview
parent81576ee51564c49d5ff3c1c07f214f22a8438231 (diff)
parenta54bc1ccac17625991e26eb5d4577f893803c683 (diff)
downloadpyramid-bda1306749c62ef4f11cfe567ed7d56c8ad94240.tar.gz
pyramid-bda1306749c62ef4f11cfe567ed7d56c8ad94240.tar.bz2
pyramid-bda1306749c62ef4f11cfe567ed7d56c8ad94240.zip
Merge pull request #3388 from mmerickel/black
format source using black
Diffstat (limited to 'tests/pkgs/forbiddenview')
-rw-r--r--tests/pkgs/forbiddenview/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/pkgs/forbiddenview/__init__.py b/tests/pkgs/forbiddenview/__init__.py
index 6b4c3c116..4c78d961c 100644
--- a/tests/pkgs/forbiddenview/__init__.py
+++ b/tests/pkgs/forbiddenview/__init__.py
@@ -3,22 +3,27 @@ from pyramid.response import Response
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
+
@forbidden_view_config(route_name='foo')
-def foo_forbidden(request): # pragma: no cover
+def foo_forbidden(request): # pragma: no cover
return Response('foo_forbidden')
+
@forbidden_view_config()
def forbidden(request):
return Response('generic_forbidden')
+
@view_config(route_name='foo')
-def foo(request): # pragma: no cover
+def foo(request): # pragma: no cover
return Response('OK foo')
+
@view_config(route_name='bar')
-def bar(request): # pragma: no cover
+def bar(request): # pragma: no cover
return Response('OK bar')
+
def includeme(config):
authn_policy = AuthTktAuthenticationPolicy('seekri1', hashalg='sha512')
authz_policy = ACLAuthorizationPolicy()
@@ -28,4 +33,3 @@ def includeme(config):
config.add_route('foo', '/foo')
config.add_route('bar', '/bar')
config.scan('tests.pkgs.forbiddenview')
-