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: