refactor error checks in register_error_handler

Co-authored-by: David Lord <davidism@gmail.com>
This commit is contained in:
Qingpeng Li 2022-04-29 01:49:23 +08:00 committed by David Lord
parent f976d5bb88
commit 1e5dd43022
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 42 additions and 37 deletions

View file

@ -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