File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ def teardown_request1(exc):
513
513
# test that all teardown_requests get passed the same original
514
514
# exception.
515
515
try :
516
- raise TypeError
516
+ raise TypeError ()
517
517
except :
518
518
pass
519
519
@app .teardown_request
@@ -524,7 +524,7 @@ def teardown_request2(exc):
524
524
# test that all teardown_requests get passed the same original
525
525
# exception.
526
526
try :
527
- raise TypeError
527
+ raise TypeError ()
528
528
except :
529
529
pass
530
530
@app .route ('/' )
@@ -1098,7 +1098,9 @@ def test_module_static_path_subdomain(self):
1098
1098
app .register_module (mod )
1099
1099
c = app .test_client ()
1100
1100
rv = c .get ('/static/hello.txt' , 'http://foo.example.com/' )
1101
+ rv .direct_passthrough = False
1101
1102
self .assert_equal (rv .data .strip (), b'Hello Subdomain' )
1103
+ rv .close ()
1102
1104
1103
1105
def test_subdomain_matching (self ):
1104
1106
app = flask .Flask (__name__ )
Original file line number Diff line number Diff line change @@ -371,6 +371,7 @@ def test_templates_and_static(self):
371
371
rv = c .get ('/admin/static/css/test.css' )
372
372
cc = parse_cache_control_header (rv .headers ['Cache-Control' ])
373
373
self .assert_equal (cc .max_age , expected_max_age )
374
+ rv .close ()
374
375
finally :
375
376
app .config ['SEND_FILE_MAX_AGE_DEFAULT' ] = max_age_default
376
377
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ def test_send_file_object(self):
206
206
with catch_warnings () as captured :
207
207
f = StringIO ('Test' )
208
208
rv = flask .send_file (f )
209
+ rv .direct_passthrough = False
209
210
self .assert_equal (rv .data , b'Test' )
210
211
self .assert_equal (rv .mimetype , 'application/octet-stream' )
211
212
rv .close ()
@@ -214,6 +215,7 @@ def test_send_file_object(self):
214
215
with catch_warnings () as captured :
215
216
f = StringIO ('Test' )
216
217
rv = flask .send_file (f , mimetype = 'text/plain' )
218
+ rv .direct_passthrough = False
217
219
self .assert_equal (rv .data , b'Test' )
218
220
self .assert_equal (rv .mimetype , 'text/plain' )
219
221
rv .close ()
You can’t perform that action at this time.
0 commit comments