fix flake8 bugbear errors

This commit is contained in:
David Lord 2023-01-18 10:31:08 -08:00
parent 8f13f5b6d6
commit 261e4a6cf2
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 17 additions and 16 deletions

View file

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