summaryrefslogtreecommitdiffhomepage
path: root/test/test_perl_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-02-26 19:53:40 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-02-26 19:53:40 +0300
commita89747e97c2a00503260d72082949be4ba97983f (patch)
tree424fea2951f83cde3f73365a0869cff92fad2a39 /test/test_perl_application.py
parent6d79c559b5cebeb2ad7c5dbdb779e3bec26fc08a (diff)
downloadunit-a89747e97c2a00503260d72082949be4ba97983f.tar.gz
unit-a89747e97c2a00503260d72082949be4ba97983f.tar.bz2
Tests: more perl tests.
Diffstat (limited to '')
-rw-r--r--test/test_perl_application.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test_perl_application.py b/test/test_perl_application.py
index 3b1e9404..f5a23a69 100644
--- a/test/test_perl_application.py
+++ b/test/test_perl_application.py
@@ -57,6 +57,12 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl):
self.assertEqual(self.get()['body'], '', 'read empty')
+ def test_perl_application_input_read_parts(self):
+ self.load('input_read_parts')
+
+ self.assertEqual(self.post(body='0123456789')['body'], '0123456789',
+ 'input read parts')
+
@unittest.expectedFailure
def test_perl_application_input_read_offset(self):
self.load('input_read_offset')
@@ -80,6 +86,12 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl):
self.assertIsNotNone(m, 'errors log')
+ def test_perl_application_header_equal_names(self):
+ self.load('header_equal_names')
+
+ self.assertListEqual(self.get()['headers']['Set-Cookie'],
+ ['tc=one,two,three', 'tc=four,five,six'], 'header equal names')
+
def test_perl_application_header_pairs(self):
self.load('header_pairs')
@@ -100,7 +112,7 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl):
body = '0123456789' * 1000
- resp = self.get(body=body)['body']
+ resp = self.post(body=body)['body']
self.assertEqual(resp, body, 'body large')