Tests: added test for "idle_timeout" with empty payload.

This commit is contained in:
Andrei Zeliankou
2020-09-21 21:24:42 +01:00
parent 449652afa1
commit 39008c1f05

View File

@@ -203,6 +203,24 @@ Connection: close
assert resp['status'] == 408, 'status idle timeout'
def test_settings_idle_timeout_2(self):
self.load('empty')
assert self.get()['status'] == 200, 'init'
self.conf({'http': {'idle_timeout': 1}}, 'settings')
_, sock = self.http(b'', start=True, raw=True, no_recv=True)
time.sleep(2)
assert (
self.get(
headers={'Host': 'localhost', 'Connection': 'close'}, sock=sock
)['status']
== 408
), 'status idle timeout'
def test_settings_max_body_size(self):
self.load('empty')