summaryrefslogtreecommitdiffhomepage
path: root/test/unit.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.py')
-rw-r--r--test/unit.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit.py b/test/unit.py
index e88ed684..55b3ce18 100644
--- a/test/unit.py
+++ b/test/unit.py
@@ -285,7 +285,6 @@ class TestUnitHTTP(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'
- blocking = False if 'blocking' not in kwargs else kwargs['blocking']
headers = ({
'Host': 'localhost',
@@ -309,6 +308,9 @@ class TestUnitHTTP(TestUnit):
if 'sock' not in kwargs:
sock = socket.socket(sock_types[sock_type], socket.SOCK_STREAM)
+ if sock_type == sock_types['ipv4'] or sock_type == sock_types['ipv6']:
+ sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+
if 'wrapper' in kwargs:
sock = kwargs['wrapper'](sock)
@@ -319,8 +321,6 @@ class TestUnitHTTP(TestUnit):
sock.close()
return None
- sock.setblocking(blocking)
-
else:
sock = kwargs['sock']
@@ -637,11 +637,11 @@ class TestUnitApplicationTLS(TestUnitApplicationProto):
return self.conf(k.read() + c.read(), '/certificates/' + crt)
def get_ssl(self, **kwargs):
- return self.get(blocking=True, wrapper=self.context.wrap_socket,
+ return self.get(wrapper=self.context.wrap_socket,
**kwargs)
def post_ssl(self, **kwargs):
- return self.post(blocking=True, wrapper=self.context.wrap_socket,
+ return self.post(wrapper=self.context.wrap_socket,
**kwargs)
def get_server_certificate(self, addr=('127.0.0.1', 7080)):