Deleted
Added
test_go_application.py (1025:3469f5185562) | test_go_application.py (1029:687f7cc7aae2) |
---|---|
1import unittest 2from unit.applications.lang.go import TestApplicationGo 3 4 5class TestGoApplication(TestApplicationGo): 6 prerequisites = ['go'] 7 8 def test_go_application_variables(self): --- 74 unchanged lines hidden (view full) --- 83 self.assertEqual(resp['status'], 404, '404 status') 84 self.assertRegex( 85 resp['body'], r'<title>404 Not Found</title>', '404 body' 86 ) 87 88 def test_go_keepalive_body(self): 89 self.load('mirror') 90 | 1import unittest 2from unit.applications.lang.go import TestApplicationGo 3 4 5class TestGoApplication(TestApplicationGo): 6 prerequisites = ['go'] 7 8 def test_go_application_variables(self): --- 74 unchanged lines hidden (view full) --- 83 self.assertEqual(resp['status'], 404, '404 status') 84 self.assertRegex( 85 resp['body'], r'<title>404 Not Found</title>', '404 body' 86 ) 87 88 def test_go_keepalive_body(self): 89 self.load('mirror') 90 |
91 self.assertEqual(self.get()['status'], 200, 'init') 92 |
|
91 (resp, sock) = self.post( 92 headers={ 93 'Host': 'localhost', 94 'Connection': 'keep-alive', 95 'Content-Type': 'text/html', 96 }, 97 start=True, 98 body='0123456789' * 500, | 93 (resp, sock) = self.post( 94 headers={ 95 'Host': 'localhost', 96 'Connection': 'keep-alive', 97 'Content-Type': 'text/html', 98 }, 99 start=True, 100 body='0123456789' * 500, |
101 read_timeout=1, |
|
99 ) 100 101 self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1') 102 103 resp = self.post( 104 headers={ 105 'Host': 'localhost', 106 'Content-Type': 'text/html', --- 80 unchanged lines hidden --- | 102 ) 103 104 self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1') 105 106 resp = self.post( 107 headers={ 108 'Host': 'localhost', 109 'Content-Type': 'text/html', --- 80 unchanged lines hidden --- |