Fix test_send_file_object

static/index.html now opens in binary mode, and therefore newline conversion does not take place.
This commit is contained in:
Michael Bikovitsky 2013-09-07 18:29:49 +03:00
parent cff35237ef
commit b7337080e4

View file

@ -260,7 +260,7 @@ class SendfileTestCase(FlaskTestCase):
app = flask.Flask(__name__)
with catch_warnings() as captured:
with app.test_request_context():
f = open(os.path.join(app.root_path, 'static/index.html'))
f = open(os.path.join(app.root_path, 'static/index.html'), mode='rb')
rv = flask.send_file(f)
rv.direct_passthrough = False
with app.open_resource('static/index.html') as f: