More explicit warning categories
This commit is contained in:
parent
d393597c50
commit
293eb583f6
1 changed files with 10 additions and 10 deletions
|
|
@ -362,8 +362,8 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# mimetypes + etag
|
# mimetypes + etag
|
||||||
assert len(recwarn.list) == 2
|
recwarn.pop(DeprecationWarning)
|
||||||
recwarn.clear()
|
recwarn.pop(DeprecationWarning)
|
||||||
|
|
||||||
app.use_x_sendfile = True
|
app.use_x_sendfile = True
|
||||||
|
|
||||||
|
|
@ -377,8 +377,8 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# mimetypes + etag
|
# mimetypes + etag
|
||||||
recwarn.pop()
|
recwarn.pop(DeprecationWarning)
|
||||||
recwarn.pop()
|
recwarn.pop(DeprecationWarning)
|
||||||
|
|
||||||
app.use_x_sendfile = False
|
app.use_x_sendfile = False
|
||||||
with app.test_request_context():
|
with app.test_request_context():
|
||||||
|
|
@ -390,7 +390,7 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# etags
|
# etags
|
||||||
recwarn.pop()
|
recwarn.pop(DeprecationWarning)
|
||||||
|
|
||||||
class PyStringIO(object):
|
class PyStringIO(object):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
@ -406,9 +406,9 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# attachment_filename and etags
|
# attachment_filename and etags
|
||||||
recwarn.pop()
|
a = recwarn.pop(DeprecationWarning)
|
||||||
recwarn.pop()
|
b = recwarn.pop(DeprecationWarning)
|
||||||
recwarn.pop()
|
c = recwarn.pop(UserWarning) # file not found
|
||||||
|
|
||||||
f = StringIO('Test')
|
f = StringIO('Test')
|
||||||
rv = flask.send_file(f, mimetype='text/plain')
|
rv = flask.send_file(f, mimetype='text/plain')
|
||||||
|
|
@ -418,7 +418,7 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# etags
|
# etags
|
||||||
recwarn.pop()
|
recwarn.pop(DeprecationWarning)
|
||||||
|
|
||||||
app.use_x_sendfile = True
|
app.use_x_sendfile = True
|
||||||
|
|
||||||
|
|
@ -429,7 +429,7 @@ class TestSendfile(object):
|
||||||
rv.close()
|
rv.close()
|
||||||
|
|
||||||
# etags
|
# etags
|
||||||
recwarn.pop()
|
recwarn.pop(DeprecationWarning)
|
||||||
|
|
||||||
def test_attachment(self, recwarn):
|
def test_attachment(self, recwarn):
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue