Use recwarn everywhere

...instead of custom fixture. Also assert that no warnings are left over
after the test.
This commit is contained in:
Markus Unterwaditzer 2016-06-03 13:56:42 +02:00
parent 047efac537
commit d393597c50
5 changed files with 110 additions and 92 deletions

View file

@ -1116,9 +1116,10 @@ def test_static_files():
rv.close()
def test_static_path_deprecated():
with pytest.deprecated_call():
app = flask.Flask(__name__, static_path='/foo')
def test_static_path_deprecated(recwarn):
app = flask.Flask(__name__, static_path='/foo')
recwarn.pop(DeprecationWarning)
app.testing = True
rv = app.test_client().get('/foo/index.html')
assert rv.status_code == 200