summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/unit.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit.py b/test/unit.py
index 35c00f97..973a69b7 100644
--- a/test/unit.py
+++ b/test/unit.py
@@ -250,8 +250,11 @@ class TestUnitHTTP(TestUnit):
if '--verbose' in sys.argv:
print('>>>', req, sep='\n')
- encoding = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
- resp = self.recvall(sock).decode(encoding)
+ resp = ''
+
+ if 'no_recv' not in kwargs:
+ enc = 'utf-8' if 'encoding' not in kwargs else kwargs['encoding']
+ resp = self.recvall(sock).decode(enc)
if '--verbose' in sys.argv:
print('<<<', resp.encode('utf-8'), sep='\n')