diff options
| author | Michael Merickel <github@m.merickel.org> | 2018-10-15 09:03:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-15 09:03:53 -0500 |
| commit | 81576ee51564c49d5ff3c1c07f214f22a8438231 (patch) | |
| tree | 5b3fe0b39a0fc33d545733d821738845909f638c /tests/pkgs/exceptionviewapp/__init__.py | |
| parent | 433efe06191a7007ca8c5bf8fafee5c7c1439ebb (diff) | |
| parent | 17e3abf320f6d9cd90f7e5a0352280c2fef584af (diff) | |
| download | pyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.tar.gz pyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.tar.bz2 pyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.zip | |
Merge pull request #3387 from mmerickel/src-folder-refactor
refactor pyramid tests into a tests folder and package into a src folder
Diffstat (limited to 'tests/pkgs/exceptionviewapp/__init__.py')
| -rw-r--r-- | tests/pkgs/exceptionviewapp/__init__.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/pkgs/exceptionviewapp/__init__.py b/tests/pkgs/exceptionviewapp/__init__.py new file mode 100644 index 000000000..ffc1b47c6 --- /dev/null +++ b/tests/pkgs/exceptionviewapp/__init__.py @@ -0,0 +1,31 @@ +from pyramid.httpexceptions import HTTPException + +def includeme(config): + config.add_route('route_raise_exception', 'route_raise_exception') + config.add_route('route_raise_httpexception', 'route_raise_httpexception') + config.add_route('route_raise_exception2', 'route_raise_exception2', + factory='.models.route_factory') + config.add_route('route_raise_exception3', 'route_raise_exception3', + factory='.models.route_factory2') + config.add_route('route_raise_exception4', 'route_raise_exception4') + config.add_view('.views.maybe') + config.add_view('.views.no', context='.models.NotAnException') + config.add_view('.views.yes', context=".models.AnException") + config.add_view('.views.raise_exception', name='raise_exception') + config.add_view('.views.raise_exception', + route_name='route_raise_exception') + config.add_view('.views.raise_exception', + route_name='route_raise_exception2') + config.add_view('.views.raise_exception', + route_name='route_raise_exception3') + config.add_view('.views.whoa', context='.models.AnException', + route_name='route_raise_exception3') + config.add_view('.views.raise_exception', + route_name='route_raise_exception4') + config.add_view('.views.whoa', context='.models.AnException', + route_name='route_raise_exception4') + config.add_view('.views.raise_httpexception', + route_name='route_raise_httpexception') + config.add_view('.views.catch_httpexception', context=HTTPException) + + |
