summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-02-14 16:09:19 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-02-14 16:09:19 +0300
commit7ce9f61cb66ddd78e2a6778970cd7c4845c79f00 (patch)
tree1f8f2e0a1331f6abd9bc94c8befa7c5402ecc741 /test
parent0f008918b347277f7fa6989c4f7c6e9d6501692c (diff)
downloadunit-7ce9f61cb66ddd78e2a6778970cd7c4845c79f00.tar.gz
unit-7ce9f61cb66ddd78e2a6778970cd7c4845c79f00.tar.bz2
Tests: minor fixes.
Diffstat (limited to '')
-rw-r--r--test/test_settings.py2
-rw-r--r--test/unit.py6
2 files changed, 3 insertions, 5 deletions
diff --git a/test/test_settings.py b/test/test_settings.py
index b4ac33dc..d272f701 100644
--- a/test/test_settings.py
+++ b/test/test_settings.py
@@ -28,8 +28,6 @@ Connection: close
def test_settings_header_read_timeout_update(self):
self.load('empty')
- r = None
-
self.conf({'http': { 'header_read_timeout': 4 }}, 'settings')
(resp, sock) = self.http(b"""GET / HTTP/1.1
diff --git a/test/unit.py b/test/unit.py
index 55b3ce18..c0c65d4a 100644
--- a/test/unit.py
+++ b/test/unit.py
@@ -235,7 +235,7 @@ class TestUnit(unittest.TestCase):
if sanitizer_errors:
self._print_path_to_log()
- self.assertFalse(sanitizer_error, 'sanitizer error(s)')
+ self.assertFalse(sanitizer_errors, 'sanitizer error(s)')
if found:
print('skipped.')
@@ -350,8 +350,8 @@ class TestUnitHTTP(TestUnit):
resp = ''
if 'no_recv' not in kwargs:
- enc = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
- resp = self.recvall(sock).decode(enc)
+ enc = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
+ resp = self.recvall(sock).decode(enc)
if TestUnit.detailed:
print('<<<', resp.encode('utf-8'), sep='\n')