summaryrefslogtreecommitdiffhomepage
path: root/test/test_node_application.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
committerAndrei Belov <defan@nginx.com>2020-04-16 18:27:26 +0300
commit74f32d26b91f49d3392605e81c1597b375890b60 (patch)
treeadfc67dfc86461441bde65512f745ce27bd6ea28 /test/test_node_application.py
parent2ff9df10ef1df43c935c870175e52473dad2c21a (diff)
parent9877087756144d3bdf343d0d4e91e1efbcc62c93 (diff)
downloadunit-74f32d26b91f49d3392605e81c1597b375890b60.tar.gz
unit-74f32d26b91f49d3392605e81c1597b375890b60.tar.bz2
Merged with the default branch.1.17.0-1
Diffstat (limited to 'test/test_node_application.py')
-rw-r--r--test/test_node_application.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_node_application.py b/test/test_node_application.py
index b80d17d3..174af15d 100644
--- a/test/test_node_application.py
+++ b/test/test_node_application.py
@@ -112,6 +112,7 @@ class TestNodeApplication(TestApplicationNode):
self.assertEqual(self.get()['status'], 200, 'init')
+ body = '0123456789' * 500
(resp, sock) = self.post(
headers={
'Host': 'localhost',
@@ -119,12 +120,13 @@ class TestNodeApplication(TestApplicationNode):
'Content-Type': 'text/html',
},
start=True,
- body='0123456789' * 500,
+ body=body,
read_timeout=1,
)
self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1')
+ body = '0123456789'
resp = self.post(
headers={
'Host': 'localhost',
@@ -132,10 +134,10 @@ class TestNodeApplication(TestApplicationNode):
'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_node_application_write_buffer(self):
self.load('write_buffer')