Do not handle RoutingExceptions with app error handlers

This commit is contained in:
Jimmy Jia 2018-11-01 16:41:53 -04:00 committed by David Lord
parent 38a391815b
commit b92b2e6c74
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
2 changed files with 13 additions and 1 deletions

View file

@ -184,6 +184,10 @@ def test_default_error_handler():
def forbidden():
raise Forbidden()
@app.route('/slash/')
def slash():
return ''
app.register_blueprint(bp, url_prefix='/bp')
c = app.test_client()
@ -191,5 +195,6 @@ def test_default_error_handler():
assert c.get('/bp/forbidden').data == b'bp-forbidden'
assert c.get('/undefined').data == b'default'
assert c.get('/forbidden').data == b'forbidden'
assert c.get('/slash').location.endswith('/slash/')