test_proxy.py (1735:a0e0d4f90e51) test_proxy.py (1736:22db875fda34)
1import re
2import socket
3import time
4
5import pytest
6
7from conftest import run_process
1import re
2import socket
3import time
4
5import pytest
6
7from conftest import run_process
8from conftest import skip_alert
9from unit.applications.lang.python import TestApplicationPython
10from unit.option import option
11from unit.utils import waitforsocket
12
13
14class TestProxy(TestApplicationPython):
15 prerequisites = {'modules': {'python': 'any'}}
16

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

477 check_proxy('http://127.0.0.1:blah')
478 check_proxy('http://127.0.0.1:-1')
479 check_proxy('http://127.0.0.1:7080b')
480 check_proxy('http://[]')
481 check_proxy('http://[]:7080')
482 check_proxy('http://[:]:7080')
483 check_proxy('http://[::7080')
484
8from unit.applications.lang.python import TestApplicationPython
9from unit.option import option
10from unit.utils import waitforsocket
11
12
13class TestProxy(TestApplicationPython):
14 prerequisites = {'modules': {'python': 'any'}}
15

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

476 check_proxy('http://127.0.0.1:blah')
477 check_proxy('http://127.0.0.1:-1')
478 check_proxy('http://127.0.0.1:7080b')
479 check_proxy('http://[]')
480 check_proxy('http://[]:7080')
481 check_proxy('http://[:]:7080')
482 check_proxy('http://[::7080')
483
485 def test_proxy_loop(self):
484 def test_proxy_loop(self, skip_alert):
486 skip_alert(
487 r'socket.*failed',
488 r'accept.*failed',
489 r'new connections are not accepted',
490 )
491 self.conf(
492 {
493 "listeners": {

--- 19 unchanged lines hidden ---
485 skip_alert(
486 r'socket.*failed',
487 r'accept.*failed',
488 r'new connections are not accepted',
489 )
490 self.conf(
491 {
492 "listeners": {

--- 19 unchanged lines hidden ---