Browse Source

Fix test_send_file_object

static/index.html now opens in binary mode, and therefore newline conversion does not take place.
pull/862/head
Michael Bikovitsky 11 years ago
parent
commit
b7337080e4
  1. 2
      flask/testsuite/helpers.py

2
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:

Loading…
Cancel
Save