From 293eb583f62e930c84dc1612fadf60185c0a9174 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 3 Jun 2016 14:04:25 +0200 Subject: [PATCH] More explicit warning categories --- tests/test_helpers.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_helpers.py b/tests/test_helpers.py index c7dde5c7..ac18d26c 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -362,8 +362,8 @@ class TestSendfile(object): rv.close() # mimetypes + etag - assert len(recwarn.list) == 2 - recwarn.clear() + recwarn.pop(DeprecationWarning) + recwarn.pop(DeprecationWarning) app.use_x_sendfile = True @@ -377,8 +377,8 @@ class TestSendfile(object): rv.close() # mimetypes + etag - recwarn.pop() - recwarn.pop() + recwarn.pop(DeprecationWarning) + recwarn.pop(DeprecationWarning) app.use_x_sendfile = False with app.test_request_context(): @@ -390,7 +390,7 @@ class TestSendfile(object): rv.close() # etags - recwarn.pop() + recwarn.pop(DeprecationWarning) class PyStringIO(object): def __init__(self, *args, **kwargs): @@ -406,9 +406,9 @@ class TestSendfile(object): rv.close() # attachment_filename and etags - recwarn.pop() - recwarn.pop() - recwarn.pop() + a = recwarn.pop(DeprecationWarning) + b = recwarn.pop(DeprecationWarning) + c = recwarn.pop(UserWarning) # file not found f = StringIO('Test') rv = flask.send_file(f, mimetype='text/plain') @@ -418,7 +418,7 @@ class TestSendfile(object): rv.close() # etags - recwarn.pop() + recwarn.pop(DeprecationWarning) app.use_x_sendfile = True @@ -429,7 +429,7 @@ class TestSendfile(object): rv.close() # etags - recwarn.pop() + recwarn.pop(DeprecationWarning) def test_attachment(self, recwarn): app = flask.Flask(__name__)