summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/python/write/wsgi.py5
-rw-r--r--test/test_python_application.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/test/python/write/wsgi.py b/test/python/write/wsgi.py
new file mode 100644
index 00000000..6c90b014
--- /dev/null
+++ b/test/python/write/wsgi.py
@@ -0,0 +1,5 @@
+def application(env, start_response):
+ write = start_response('200', [('Content-Length', '10')])
+ write(b'012')
+ write(b'345')
+ return b'6789'
diff --git a/test/test_python_application.py b/test/test_python_application.py
index f54d5803..1a6560e5 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -238,5 +238,10 @@ class TestUnitPythonApplication(unit.TestUnitApplicationPython):
r'\[error\].+the application returned not an iterable object'),
'not iterable')
+ def test_python_application_write(self):
+ self.load('write')
+
+ self.assertEqual(self.get()['body'], '0123456789', 'write')
+
if __name__ == '__main__':
unittest.main()