Optional TCP_KEEPIDLE in unit tests
Allows to run unit tests on BSD-based platforms. The commit da99c339 that solved the problem doesn't contain fixes of unit tests. Change-Id: Iff1771c1cbb37c30a888cd1da4fca5636e5797e7
This commit is contained in:
parent
f99cf2dcc1
commit
2a67003e77
@ -235,10 +235,11 @@ class TestWSGI(unittest.TestCase):
|
|||||||
socket.SO_REUSEADDR: 1,
|
socket.SO_REUSEADDR: 1,
|
||||||
socket.SO_KEEPALIVE: 1,
|
socket.SO_KEEPALIVE: 1,
|
||||||
},
|
},
|
||||||
socket.IPPROTO_TCP: {
|
|
||||||
socket.TCP_KEEPIDLE: 600,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
if hasattr(socket, 'TCP_KEEPIDLE'):
|
||||||
|
expected_socket_opts[socket.IPPROTO_TCP] = {
|
||||||
|
socket.TCP_KEEPIDLE: 600,
|
||||||
|
}
|
||||||
self.assertEquals(sock.opts, expected_socket_opts)
|
self.assertEquals(sock.opts, expected_socket_opts)
|
||||||
# test ssl
|
# test ssl
|
||||||
sock = wsgi.get_socket(ssl_conf)
|
sock = wsgi.get_socket(ssl_conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user