Tests: minor fixes and style.

This commit is contained in:
Andrei Zeliankou
2020-04-14 02:35:04 +01:00
parent 58cc13ab29
commit 0bfa09dfa0
16 changed files with 99 additions and 175 deletions

View File

@@ -322,6 +322,7 @@ class TestRubyApplication(TestApplicationRuby):
self.assertEqual(self.get()['status'], 200, 'init')
body = '0123456789' * 500
(resp, sock) = self.post(
headers={
'Host': 'localhost',
@@ -329,12 +330,13 @@ class TestRubyApplication(TestApplicationRuby):
'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',
@@ -342,10 +344,10 @@ class TestRubyApplication(TestApplicationRuby):
'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_ruby_application_constants(self):
self.load('constants')