test_proxy.py (1596:b7e2d4d92624) test_proxy.py (1635:97afbb6c5a15)
1import pytest
2import re
3import socket
4import time
5
1import re
2import socket
3import time
4
5import pytest
6
7from conftest import option
8from conftest import skip_alert
6from unit.applications.lang.python import TestApplicationPython
9from unit.applications.lang.python import TestApplicationPython
7from conftest import option, skip_alert
8
9
10class TestProxy(TestApplicationPython):
11 prerequisites = {'modules': {'python': 'any'}}
12
13 SERVER_PORT = 7999
14
15 @staticmethod

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

210 header_value = 'blah'
211 assert (
212 self.get_http10(
213 headers={'Host': 'localhost', 'Custom-Header': header_value}
214 )['headers']['Custom-Header']
215 == header_value
216 ), 'custom header'
217
10
11
12class TestProxy(TestApplicationPython):
13 prerequisites = {'modules': {'python': 'any'}}
14
15 SERVER_PORT = 7999
16
17 @staticmethod

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

212 header_value = 'blah'
213 assert (
214 self.get_http10(
215 headers={'Host': 'localhost', 'Custom-Header': header_value}
216 )['headers']['Custom-Header']
217 == header_value
218 ), 'custom header'
219
218 header_value = '(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
220 header_value = r'(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
219 assert (
220 self.get_http10(
221 headers={'Host': 'localhost', 'Custom-Header': header_value}
222 )['headers']['Custom-Header']
223 == header_value
224 ), 'custom header 2'
225
226 header_value = 'X' * 4096

--- 284 unchanged lines hidden ---
221 assert (
222 self.get_http10(
223 headers={'Host': 'localhost', 'Custom-Header': header_value}
224 )['headers']['Custom-Header']
225 == header_value
226 ), 'custom header 2'
227
228 header_value = 'X' * 4096

--- 284 unchanged lines hidden ---