|
|
@ -443,7 +443,7 @@ class BasicFunctionalityTestCase(FlaskTestCase): |
|
|
|
evts.append('before') |
|
|
|
evts.append('before') |
|
|
|
@app.after_request |
|
|
|
@app.after_request |
|
|
|
def after_request(response): |
|
|
|
def after_request(response): |
|
|
|
response.data += '|after' |
|
|
|
response.data += b'|after' |
|
|
|
evts.append('after') |
|
|
|
evts.append('after') |
|
|
|
return response |
|
|
|
return response |
|
|
|
@app.route('/') |
|
|
|
@app.route('/') |
|
|
@ -453,7 +453,7 @@ class BasicFunctionalityTestCase(FlaskTestCase): |
|
|
|
return 'request' |
|
|
|
return 'request' |
|
|
|
self.assert_not_in('after', evts) |
|
|
|
self.assert_not_in('after', evts) |
|
|
|
rv = app.test_client().get('/').data |
|
|
|
rv = app.test_client().get('/').data |
|
|
|
self.assert_in(b'after', evts) |
|
|
|
self.assert_in('after', evts) |
|
|
|
self.assert_equal(rv, b'request|after') |
|
|
|
self.assert_equal(rv, b'request|after') |
|
|
|
|
|
|
|
|
|
|
|
def test_after_request_processing(self): |
|
|
|
def test_after_request_processing(self): |
|
|
|