Merge branch '0.10-maintenance'

This commit is contained in:
Markus Unterwaditzer 2015-07-16 12:05:07 +02:00
commit 81ae94a5fd
3 changed files with 17 additions and 2 deletions

View file

@ -1069,6 +1069,18 @@ def test_build_error_handler():
assert flask.url_for('spam') == '/test_handler/'
def test_build_error_handler_reraise():
app = flask.Flask(__name__)
# Test a custom handler which reraises the BuildError
def handler_raises_build_error(error, endpoint, values):
raise error
app.url_build_error_handlers.append(handler_raises_build_error)
with app.test_request_context():
pytest.raises(BuildError, flask.url_for, 'not.existing')
def test_custom_converters():
from werkzeug.routing import BaseConverter