Tests: minor fixes and style.
This commit is contained in:
@@ -89,6 +89,7 @@ class TestGoApplication(TestApplicationGo):
|
||||
|
||||
self.assertEqual(self.get()['status'], 200, 'init')
|
||||
|
||||
body = '0123456789' * 500
|
||||
(resp, sock) = self.post(
|
||||
headers={
|
||||
'Host': 'localhost',
|
||||
@@ -96,12 +97,13 @@ class TestGoApplication(TestApplicationGo):
|
||||
'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',
|
||||
@@ -109,10 +111,10 @@ class TestGoApplication(TestApplicationGo):
|
||||
'Connection': 'close',
|
||||
},
|
||||
sock=sock,
|
||||
body='0123456789',
|
||||
body=body,
|
||||
)
|
||||
|
||||
self.assertEqual(resp['body'], '0123456789', 'keep-alive 2')
|
||||
self.assertEqual(resp['body'], body, 'keep-alive 2')
|
||||
|
||||
def test_go_application_cookies(self):
|
||||
self.load('cookies')
|
||||
|
||||
Reference in New Issue
Block a user