From b7337080e48990393cf960890504710bc7cbc136 Mon Sep 17 00:00:00 2001 From: Michael Bikovitsky Date: Sat, 7 Sep 2013 18:29:49 +0300 Subject: [PATCH] Fix test_send_file_object static/index.html now opens in binary mode, and therefore newline conversion does not take place. --- flask/testsuite/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/testsuite/helpers.py b/flask/testsuite/helpers.py index 7de70c0a..4bb43ac2 100644 --- a/flask/testsuite/helpers.py +++ b/flask/testsuite/helpers.py @@ -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: