summaryrefslogtreecommitdiffhomepage
path: root/test/test_php_application.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-04-14 02:35:04 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2020-04-14 02:35:04 +0100
commit0bfa09dfa0ec6a1474ba30d0e1f8aea832fbc1fc (patch)
tree99dd1db9a07c82aafd61b3afb03d12e65e0d399d /test/test_php_application.py
parent58cc13ab291cac5b13462006e3feb780178ef5f3 (diff)
downloadunit-0bfa09dfa0ec6a1474ba30d0e1f8aea832fbc1fc.tar.gz
unit-0bfa09dfa0ec6a1474ba30d0e1f8aea832fbc1fc.tar.bz2
Tests: minor fixes and style.
Diffstat (limited to 'test/test_php_application.py')
-rw-r--r--test/test_php_application.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py
index c3645a99..48e1e815 100644
--- a/test/test_php_application.py
+++ b/test/test_php_application.py
@@ -183,6 +183,7 @@ class TestPHPApplication(TestApplicationPHP):
self.assertEqual(self.get()['status'], 200, 'init')
+ body = '0123456789' * 500
(resp, sock) = self.post(
headers={
'Host': 'localhost',
@@ -190,12 +191,13 @@ class TestPHPApplication(TestApplicationPHP):
'Content-Type': 'text/html',
},
start=True,
- body='0123456789' * 500,
+ body=body,
read_timeout=1,
)
- self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1')
+ self.assertEqual(resp['body'], body, 'keep-alive 1')
+ body = '0123456789'
resp = self.post(
headers={
'Host': 'localhost',
@@ -203,10 +205,10 @@ class TestPHPApplication(TestApplicationPHP):
'Content-Type': 'text/html',
},
sock=sock,
- body='0123456789',
+ body=body,
)
- self.assertEqual(resp['body'], '0123456789', 'keep-alive 2')
+ self.assertEqual(resp['body'], body, 'keep-alive 2')
def test_php_application_conditional(self):
self.load('conditional')