summaryrefslogtreecommitdiffhomepage
path: root/test/test_perl_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-03-01 17:13:51 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-03-01 17:13:51 +0300
commit754b85c3eedc6717b9bb94fe82a80f36f25a3e9f (patch)
tree4b97fd2e07beccc8e218a2ee7363952be2689d4f /test/test_perl_application.py
parentd92feef571696c4e0ec837fd7f7e237aea038af4 (diff)
downloadunit-754b85c3eedc6717b9bb94fe82a80f36f25a3e9f.tar.gz
unit-754b85c3eedc6717b9bb94fe82a80f36f25a3e9f.tar.bz2
Tests: Perl streaming body and delayed response simple tests.
Diffstat (limited to 'test/test_perl_application.py')
-rw-r--r--test/test_perl_application.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_perl_application.py b/test/test_perl_application.py
index 4609c2bd..b169baab 100644
--- a/test/test_perl_application.py
+++ b/test/test_perl_application.py
@@ -200,5 +200,21 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl):
self.search_in_log(r'\[error\].+IOFake close\(\) called'),
'body io fake close')
+ def test_perl_delayed_response(self):
+ self.load('delayed_response')
+
+ resp = self.get()
+
+ self.assertEqual(resp['status'], 200, 'status')
+ self.assertEqual(resp['body'], 'Hello World!', 'body')
+
+ def test_perl_streaming_body(self):
+ self.load('streaming_body')
+
+ resp = self.get()
+
+ self.assertEqual(resp['status'], 200, 'status')
+ self.assertEqual(resp['body'], 'Hello World!', 'body')
+
if __name__ == '__main__':
TestUnitPerlApplication.main()