Skip to content
Myr

More explicit warning categories

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parent d393597 · Browse files · 1 file+10 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−10 removed

  • tests:+10 added−10 removed

1 file+10 added−10 removed

modified:tests/test_helpers.py+10 added-10 removed
360 unmodified lines
361 assert rv.mimetype == 'text/html'362 rv.close()363364 # mimetypes + etag365 assert len(recwarn.list) == 2366 recwarn.clear()365 recwarn.pop(DeprecationWarning)366 recwarn.pop(DeprecationWarning)367368 app.use_x_sendfile = True369370 with app.test_request_context():
5 unmodified lines
376 os.path.join(app.root_path, 'static/index.html')377 rv.close()378379 # mimetypes + etag380 recwarn.pop()381 recwarn.pop()380 recwarn.pop(DeprecationWarning)381 recwarn.pop(DeprecationWarning)382383 app.use_x_sendfile = False384 with app.test_request_context():385 f = StringIO('Test')
3 unmodified lines
389 assert rv.mimetype == 'application/octet-stream'390 rv.close()391392 # etags393 recwarn.pop()393 recwarn.pop(DeprecationWarning)394395 class PyStringIO(object):396 def __init__(self, *args, **kwargs):397 self._io = StringIO(*args, **kwargs)
7 unmodified lines
405 assert rv.mimetype == 'text/plain'406 rv.close()407408 # attachment_filename and etags409 recwarn.pop()410 recwarn.pop()411 recwarn.pop()409 a = recwarn.pop(DeprecationWarning)410 b = recwarn.pop(DeprecationWarning)411 c = recwarn.pop(UserWarning) # file not found412413 f = StringIO('Test')414 rv = flask.send_file(f, mimetype='text/plain')415 rv.direct_passthrough = False
1 unmodified line
417 assert rv.mimetype == 'text/plain'418 rv.close()419420 # etags421 recwarn.pop()421 recwarn.pop(DeprecationWarning)422423 app.use_x_sendfile = True424425 with app.test_request_context():
2 unmodified lines
428 assert 'x-sendfile' not in rv.headers429 rv.close()430431 # etags432 recwarn.pop()432 recwarn.pop(DeprecationWarning)433434 def test_attachment(self, recwarn):435 app = flask.Flask(__name__)436 with app.test_request_context():
313 unmodified lines