diff options
author | Andrei Belov <defan@nginx.com> | 2021-02-04 18:40:45 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2021-02-04 18:40:45 +0300 |
commit | 0997fa324ca523ab282f595ac9f44b3e4daff86a (patch) | |
tree | 37424fff265780f34f9a9adb7ddd7501a67843f1 /test/test_proxy.py | |
parent | 2bc99c614d5547e773bda73364efada47f0a37bf (diff) | |
parent | 774a6034d9daf32ac6c98da7e4c0ca9e820536b4 (diff) | |
download | unit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.gz unit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.bz2 |
Merged with the default branch.
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r-- | test/test_proxy.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index be3e93fd..2d305e98 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -3,12 +3,10 @@ import socket import time import pytest - -from conftest import option from conftest import run_process -from conftest import skip_alert -from conftest import waitforsocket from unit.applications.lang.python import TestApplicationPython +from unit.option import option +from unit.utils import waitforsocket class TestProxy(TestApplicationPython): @@ -174,7 +172,9 @@ Content-Length: 10 assert resp['status'] == 200, 'status' assert resp['body'] == payload, 'body' - self.conf({'http': {'max_body_size': 32 * 1024 * 1024}}, 'settings') + assert 'success' in self.conf( + {'http': {'max_body_size': 32 * 1024 * 1024}}, 'settings' + ) payload = '0123456789abcdef' * 32 * 64 * 1024 resp = self.post_http10(body=payload, read_buffer_size=1024 * 1024) @@ -482,13 +482,13 @@ Content-Length: 10 check_proxy('http://[:]:7080') check_proxy('http://[::7080') - def test_proxy_loop(self): + def test_proxy_loop(self, skip_alert): skip_alert( r'socket.*failed', r'accept.*failed', r'new connections are not accepted', ) - self.conf( + assert 'success' in self.conf( { "listeners": { "*:7080": {"pass": "routes"}, |