Browse Source

fix data types in after_request test

TODO: why was that bug not causing / displaying an exception somehow?
      should give a TypeError in py 3.3.
pull/745/head
Thomas Waldmann 12 years ago
parent
commit
f9e9e77464
  1. 4
      flask/testsuite/basic.py

4
flask/testsuite/basic.py

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

Loading…
Cancel
Save