diff options
Diffstat (limited to 'test/test_settings.py')
-rw-r--r-- | test/test_settings.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_settings.py b/test/test_settings.py index 4b9304e9..816dcb5e 100644 --- a/test/test_settings.py +++ b/test/test_settings.py @@ -25,10 +25,11 @@ Connection: close self.assertEqual(resp['status'], 408, 'status header read timeout') - @unittest.expectedFailure 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 @@ -42,11 +43,15 @@ Connection: close time.sleep(2) (resp, sock) = self.http(b"""X-Blah: blah -""", start=True, sock=sock, raw=True, no_recv=True) +""", start=True, sock=sock, raw=True) - time.sleep(2) + if len(resp) != 0: + sock.close() + + else: + time.sleep(2) - resp = self.http(b"""Connection: close + resp = self.http(b"""Connection: close """, sock=sock, raw=True) |