diff options
Diffstat (limited to 'test/test_access_log.py')
-rw-r--r-- | test/test_access_log.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py index b5bfff7a..ad47c971 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -19,6 +19,8 @@ class TestAccessLog(TestApplicationPython): def test_access_log_keepalive(self): self.load('mirror') + self.assertEqual(self.get()['status'], 200, 'init') + (resp, sock) = self.post( headers={ 'Host': 'localhost', @@ -27,6 +29,7 @@ class TestAccessLog(TestApplicationPython): }, start=True, body='01234', + read_timeout=1, ) self.assertIsNotNone( @@ -174,7 +177,7 @@ Connection: close def test_access_log_partial(self): self.load('empty') - self.http(b"""GE""", raw=True) + self.http(b"""GE""", raw=True, no_recv=True) self.stop() @@ -185,7 +188,7 @@ Connection: close def test_access_log_partial_2(self): self.load('empty') - self.http(b"""GET /\n""", raw=True) + self.http(b"""GET /\n""", raw=True, no_recv=True) self.stop() @@ -196,7 +199,7 @@ Connection: close def test_access_log_partial_3(self): self.load('empty') - self.http(b"""GET / HTTP/1.1""", raw=True) + self.http(b"""GET / HTTP/1.1""", raw=True, no_recv=True) self.stop() @@ -207,7 +210,7 @@ Connection: close def test_access_log_partial_4(self): self.load('empty') - resp = self.http(b"""GET / HTTP/1.1\n""", raw=True) + resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, no_recv=True) self.stop() @@ -219,7 +222,9 @@ Connection: close def test_access_log_partial_5(self): self.load('empty') - self.http(b"""GET / HTTP/1.1\n\n""", raw=True) + self.assertEqual(self.post()['status'], 200, 'init') + + self.http(b"""GET / HTTP/1.1\n\n""", raw=True, read_timeout=1) self.stop() |