From bc3f444803bf616de5fcabf286f38ebcdc982705 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Tue, 4 Jan 2011 23:50:41 -0500 Subject: [PATCH] updated test_streaming to provide iterator example --- tests/test_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_base.py b/tests/test_base.py index 6226987..cd6e3ee 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -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'