Deleted Added
1from unit.applications.lang.go import TestApplicationGo
2
3
4class TestGoApplication(TestApplicationGo):
5 prerequisites = {'modules': ['go']}
6
7 def test_go_application_variables(self):
8 self.load('variables')

--- 75 unchanged lines hidden (view full) ---

84 resp['body'], r'<title>404 Not Found</title>', '404 body'
85 )
86
87 def test_go_keepalive_body(self):
88 self.load('mirror')
89
90 self.assertEqual(self.get()['status'], 200, 'init')
91
92 (resp, sock) = self.post(
93 headers={
94 'Host': 'localhost',
95 'Connection': 'keep-alive',
96 'Content-Type': 'text/html',
97 },
98 start=True,
99 body='0123456789' * 500,
100 read_timeout=1,
101 )
102
103 self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1')
104
105 resp = self.post(
106 headers={
107 'Host': 'localhost',
108 'Content-Type': 'text/html',
109 'Connection': 'close',
110 },
111 sock=sock,
112 body='0123456789',
113 )
114
115 self.assertEqual(resp['body'], '0123456789', 'keep-alive 2')
116
117 def test_go_application_cookies(self):
118 self.load('cookies')
119
120 resp = self.get(
121 headers={
122 'Host': 'localhost',
123 'Cookie': 'var1=val1; var2=val2',

--- 65 unchanged lines hidden ---