test_proxy_chunked.py (1635:97afbb6c5a15) test_proxy_chunked.py (1654:fc7d0578e124)
1import re
2import select
3import socket
4import time
5
1import re
2import select
3import socket
4import time
5
6from conftest import option
7from conftest import run_process
8from conftest import waitforsocket
6from unit.applications.lang.python import TestApplicationPython
7
8
9class TestProxyChunked(TestApplicationPython):
10 prerequisites = {'modules': {'python': 'any'}}
11
12 SERVER_PORT = 7999
13

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

77 body = body + l + '\r\n' + c + '\r\n'
78
79 return body + '0\r\n\r\n'
80
81 def get_http10(self, *args, **kwargs):
82 return self.get(*args, http_10=True, **kwargs)
83
84 def setup_method(self):
9from unit.applications.lang.python import TestApplicationPython
10
11
12class TestProxyChunked(TestApplicationPython):
13 prerequisites = {'modules': {'python': 'any'}}
14
15 SERVER_PORT = 7999
16

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

80 body = body + l + '\r\n' + c + '\r\n'
81
82 return body + '0\r\n\r\n'
83
84 def get_http10(self, *args, **kwargs):
85 return self.get(*args, http_10=True, **kwargs)
86
87 def setup_method(self):
85 super().setup_method()
88 run_process(self.run_server, self.SERVER_PORT, option.temp_dir)
89 waitforsocket(self.SERVER_PORT)
86
90
87 self.run_process(self.run_server, self.SERVER_PORT, self.temp_dir)
88 self.waitforsocket(self.SERVER_PORT)
89
90 assert 'success' in self.conf(
91 {
92 "listeners": {"*:7080": {"pass": "routes"},},
93 "routes": [
94 {
95 "action": {
96 "proxy": "http://127.0.0.1:"
97 + str(self.SERVER_PORT)

--- 141 unchanged lines hidden ---
91 assert 'success' in self.conf(
92 {
93 "listeners": {"*:7080": {"pass": "routes"},},
94 "routes": [
95 {
96 "action": {
97 "proxy": "http://127.0.0.1:"
98 + str(self.SERVER_PORT)

--- 141 unchanged lines hidden ---