Commit Graph

7 Commits

Author SHA1 Message Date
David Lord 310fbfcf64
revert copyright year to project start
add copyright header to files
2018-02-08 12:43:30 -08:00
Christian Stade-Schuldt 5b0b9717da DRYing up the test suite using pytest fixtures (#2306)
* add fixtures to conftest.py

* use fixtures in test_appctx.py

* use fixtures in test_blueprints.py

* use fixtures in test_depreciations.py

* use fixtures in test_regressions.py

* use fixtures in test_reqctx.py

* use fixtures in test_templating.py

* use fixtures in test_user_error_handler.py

* use fixtures in test_views.py

* use fixtures in test_basics.py

* use fixtures in test_helpers.py

* use fixtures in test_testing.py

* update conftest.py

* make docstrings  PEP-257 compliant

* cleanup

* switch dictonary format

* use pytest parameterization for test_json_as_unicode
2017-05-23 15:18:39 -07:00
cerickson 4f815015b8 Added support for generic HTTPException handlers on app and blueprints
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None

Corresponding tests also added.

Ref issue #941, pr #1383, #2082, #2144
2017-05-23 10:45:42 -07:00
Florian Sachs 668061a5fc Register errorhandlers for Exceptions
Allow a default errorhandler by registering
an errorhandler for HTTPException

tests included
2017-05-23 10:34:31 -07:00
Joshua Carp 348bf52188 Handle empty deque on errorhandler lookup.
After registering a custom errorhandler by exception class, raising any
unhandled exception in a view function swallows the error and instead
throws an `IndexError` on trying to look up the appropriate handler.
This patch avoids the uninformative `IndexError` and preserves the
original exception by looping until the deque of classes is empty, not
forever.
2015-06-02 16:13:30 -04:00
Markus Unterwaditzer 0bac2ade91 Fix formatting errors 2015-04-11 20:52:47 +02:00
Phil Schaf fd8e6b26f9 removed ExceptionHandlerDict 2015-04-11 14:05:22 +02:00