forked from orbit-oss/flask
fix flake8 bugbear errors
This commit is contained in:
parent
8f13f5b6d6
commit
261e4a6cf2
3 changed files with 17 additions and 16 deletions
|
|
@ -120,14 +120,14 @@ def test_app_tearing_down_with_unhandled_exception(app, client):
|
|||
|
||||
@app.route("/")
|
||||
def index():
|
||||
raise Exception("dummy")
|
||||
raise ValueError("dummy")
|
||||
|
||||
with pytest.raises(Exception, match="dummy"):
|
||||
with pytest.raises(ValueError, match="dummy"):
|
||||
with app.app_context():
|
||||
client.get("/")
|
||||
|
||||
assert len(cleanup_stuff) == 1
|
||||
assert isinstance(cleanup_stuff[0], Exception)
|
||||
assert isinstance(cleanup_stuff[0], ValueError)
|
||||
assert str(cleanup_stuff[0]) == "dummy"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue