Tests: minor fixes.
This commit is contained in:
@@ -28,8 +28,6 @@ Connection: close
|
|||||||
def test_settings_header_read_timeout_update(self):
|
def test_settings_header_read_timeout_update(self):
|
||||||
self.load('empty')
|
self.load('empty')
|
||||||
|
|
||||||
r = None
|
|
||||||
|
|
||||||
self.conf({'http': { 'header_read_timeout': 4 }}, 'settings')
|
self.conf({'http': { 'header_read_timeout': 4 }}, 'settings')
|
||||||
|
|
||||||
(resp, sock) = self.http(b"""GET / HTTP/1.1
|
(resp, sock) = self.http(b"""GET / HTTP/1.1
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ class TestUnit(unittest.TestCase):
|
|||||||
|
|
||||||
if sanitizer_errors:
|
if sanitizer_errors:
|
||||||
self._print_path_to_log()
|
self._print_path_to_log()
|
||||||
self.assertFalse(sanitizer_error, 'sanitizer error(s)')
|
self.assertFalse(sanitizer_errors, 'sanitizer error(s)')
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
print('skipped.')
|
print('skipped.')
|
||||||
@@ -350,8 +350,8 @@ class TestUnitHTTP(TestUnit):
|
|||||||
resp = ''
|
resp = ''
|
||||||
|
|
||||||
if 'no_recv' not in kwargs:
|
if 'no_recv' not in kwargs:
|
||||||
enc = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
|
enc = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
|
||||||
resp = self.recvall(sock).decode(enc)
|
resp = self.recvall(sock).decode(enc)
|
||||||
|
|
||||||
if TestUnit.detailed:
|
if TestUnit.detailed:
|
||||||
print('<<<', resp.encode('utf-8'), sep='\n')
|
print('<<<', resp.encode('utf-8'), sep='\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user