summaryrefslogtreecommitdiffhomepage
path: root/test/test_proxy.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-02-06 18:25:25 +0300
committerAndrei Belov <defan@nginx.com>2020-02-06 18:25:25 +0300
commit2dc01938cf02cc05b41a09e618f712129c4cdf91 (patch)
tree556dd40a0ec8c194774d53eed9ff62ed1d25ee7c /test/test_proxy.py
parent477a58e14010ab14d6ab453860b360cf806f5012 (diff)
parent6e19090736612b39d4c5d0836d7df0722b8955e7 (diff)
downloadunit-2dc01938cf02cc05b41a09e618f712129c4cdf91.tar.gz
unit-2dc01938cf02cc05b41a09e618f712129c4cdf91.tar.bz2
Merged with the default branch.1.15.0-1
Diffstat (limited to '')
-rw-r--r--test/test_proxy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 4697b88f..5d158285 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -10,11 +10,12 @@ class TestProxy(TestApplicationPython):
SERVER_PORT = 7999
- def run_server(self):
+ @staticmethod
+ def run_server(server_port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- server_address = ('', self.SERVER_PORT)
+ server_address = ('', server_port)
sock.bind(server_address)
sock.listen(5)
@@ -57,7 +58,7 @@ Content-Length: 10
def setUp(self):
super().setUp()
- self.run_process(self.run_server)
+ self.run_process(self.run_server, self.SERVER_PORT)
self.waitforsocket(self.SERVER_PORT)
self.assertIn(