mirror of https://github.com/pallets/flask.git
commit
4c0253f9fd
|
|
@ -125,7 +125,9 @@ class ExtImportHookTestCase(FlaskTestCase):
|
|||
next = tb.tb_next.tb_next
|
||||
if not PY2:
|
||||
next = next.tb_next
|
||||
self.assert_in('flask_broken/__init__.py', next.tb_frame.f_code.co_filename)
|
||||
|
||||
import os.path
|
||||
self.assert_in(os.path.join('flask_broken', '__init__.py'), next.tb_frame.f_code.co_filename)
|
||||
|
||||
|
||||
def suite():
|
||||
|
|
|
|||
|
|
@ -269,7 +269,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…
Reference in New Issue