diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-18 00:25:57 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-18 00:25:57 +0300 |
commit | 26fcb461370062aa11f78f77c5e022c817e6e7c1 (patch) | |
tree | e45ee03f74b6bfc3ef025bb72017fa3623c4aa5f /test/unit/http.py | |
parent | 23215c839f0b00c288b6556ce405b0e54f4f50ae (diff) | |
download | unit-26fcb461370062aa11f78f77c5e022c817e6e7c1.tar.gz unit-26fcb461370062aa11f78f77c5e022c817e6e7c1.tar.bz2 |
Tests: added read_buffer_size option in http().
Diffstat (limited to 'test/unit/http.py')
-rw-r--r-- | test/unit/http.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/unit/http.py b/test/unit/http.py index 01611221..82a6bd6a 100644 --- a/test/unit/http.py +++ b/test/unit/http.py @@ -12,6 +12,11 @@ class TestHTTP(TestUnit): port = 7080 if 'port' not in kwargs else kwargs['port'] url = '/' if 'url' not in kwargs else kwargs['url'] http = 'HTTP/1.0' if 'http_10' in kwargs else 'HTTP/1.1' + read_buffer_size = ( + 4096 + if 'read_buffer_size' not in kwargs + else kwargs['read_buffer_size'] + ) headers = ( {'Host': 'localhost', 'Connection': 'close'} @@ -94,7 +99,9 @@ class TestHTTP(TestUnit): read_timeout = ( 30 if 'read_timeout' not in kwargs else kwargs['read_timeout'] ) - resp = self.recvall(sock, read_timeout=read_timeout).decode(enc) + resp = self.recvall( + sock, read_timeout=read_timeout, buff_size=read_buffer_size + ).decode(enc) if TestUnit.detailed: print('<<<') |