Skip to content
Myr

Fix test_send_file_object

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

static/index.html now opens in binary mode, and therefore newline conversion does not take place.

authored by Michael Bikovitsky · committed by Michael Bikovitsky · parent cff3523 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/testsuite/helpers.py+1 added-1 removed
258 unmodified lines
259 def test_send_file_object(self):260 app = flask.Flask(__name__)261 with catch_warnings() as captured:262 with app.test_request_context():263 f = open(os.path.join(app.root_path, 'static/index.html'))263 f = open(os.path.join(app.root_path, 'static/index.html'), mode='rb')264 rv = flask.send_file(f)265 rv.direct_passthrough = False266 with app.open_resource('static/index.html') as f:267 self.assert_equal(rv.data, f.read())
356 unmodified lines