forked from orbit-oss/flask
refactor error checks in register_error_handler
Co-authored-by: David Lord <davidism@gmail.com>
This commit is contained in:
parent
f976d5bb88
commit
1e5dd43022
4 changed files with 42 additions and 37 deletions
|
|
@ -899,13 +899,6 @@ def test_error_handling(app, client):
|
|||
assert b"forbidden" == rv.data
|
||||
|
||||
|
||||
def test_error_handler_unknown_code(app):
|
||||
with pytest.raises(KeyError) as exc_info:
|
||||
app.register_error_handler(999, lambda e: ("999", 999))
|
||||
|
||||
assert "Use a subclass" in exc_info.value.args[0]
|
||||
|
||||
|
||||
def test_error_handling_processing(app, client):
|
||||
app.testing = False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue