Skip to content

Commit 8aaf302

Browse files
committed
Disable direct passthrough for accessing the data attribute on newer Werkzeugs
1 parent eb622fb commit 8aaf302

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flask/testsuite/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def test_send_file_regular(self):
158158
self.assert_true(rv.direct_passthrough)
159159
self.assert_equal(rv.mimetype, 'text/html')
160160
with app.open_resource('static/index.html') as f:
161+
rv.direct_passthrough = False
161162
self.assert_equal(rv.data, f.read())
162163
rv.close()
163164

@@ -179,6 +180,7 @@ def test_send_file_object(self):
179180
with app.test_request_context():
180181
f = open(os.path.join(app.root_path, 'static/index.html'))
181182
rv = flask.send_file(f)
183+
rv.direct_passthrough = False
182184
with app.open_resource('static/index.html') as f:
183185
self.assert_equal(rv.data, f.read())
184186
self.assert_equal(rv.mimetype, 'text/html')

0 commit comments

Comments
 (0)