updated test_streaming to provide iterator example

This commit is contained in:
Mark McClain
2011-01-04 23:50:41 -05:00
parent 2d744aa1e6
commit bc3f444803

View File

@@ -310,8 +310,10 @@ class TestEngines(object):
@expose(content_type='text/plain')
def test(self, foo):
if foo == 'stream':
contents = 'stream'
response.content_type='application/octet-stream'
response.body = 'stream'
response.content_length = len(contents)
response.app_iter = iter(contents)
return response
else:
return 'plain text'