Add unit test for should_ignore_error to confirm it always returns False while issuing DeprecationWarning
This commit is contained in:
parent
0b86f57e4b
commit
c12a967097
1 changed files with 7 additions and 0 deletions
|
|
@ -13,3 +13,10 @@ def test_should_ignore_error_multiple_exceptions(error):
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning):
|
||||||
assert app.should_ignore_error(error) is False
|
assert app.should_ignore_error(error) is False
|
||||||
|
|
||||||
|
def test_should_ignore_error_returns_false():
|
||||||
|
"""Verify that should_ignore_error always returns False."""
|
||||||
|
app = Flask(__name__)
|
||||||
|
with pytest.warns(DeprecationWarning):
|
||||||
|
result = app.should_ignore_error(Exception())
|
||||||
|
assert result is False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue