summaryrefslogtreecommitdiffhomepage
path: root/test/test_access_log.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-04-15 15:52:32 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-04-15 15:52:32 +0300
commit0f8a602c3c67fb55d992898cc7a146b9232572bd (patch)
tree204c30d90d645d4bd079676fd0bed7c64a9076da /test/test_access_log.py
parent5e1cf14565675ad1bbc983901a33ab6fe7e0c906 (diff)
downloadunit-0f8a602c3c67fb55d992898cc7a146b9232572bd.tar.gz
unit-0f8a602c3c67fb55d992898cc7a146b9232572bd.tar.bz2
Tests: added time to handle requests in access_log partial tests.
Diffstat (limited to 'test/test_access_log.py')
-rw-r--r--test/test_access_log.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py
index ad47c971..c9588e61 100644
--- a/test/test_access_log.py
+++ b/test/test_access_log.py
@@ -177,7 +177,9 @@ Connection: close
def test_access_log_partial(self):
self.load('empty')
- self.http(b"""GE""", raw=True, no_recv=True)
+ self.assertEqual(self.post()['status'], 200, 'init')
+
+ self.http(b"""GE""", raw=True, read_timeout=1)
self.stop()
@@ -188,7 +190,9 @@ Connection: close
def test_access_log_partial_2(self):
self.load('empty')
- self.http(b"""GET /\n""", raw=True, no_recv=True)
+ self.assertEqual(self.post()['status'], 200, 'init')
+
+ self.http(b"""GET /\n""", raw=True, read_timeout=1)
self.stop()
@@ -199,7 +203,9 @@ Connection: close
def test_access_log_partial_3(self):
self.load('empty')
- self.http(b"""GET / HTTP/1.1""", raw=True, no_recv=True)
+ self.assertEqual(self.post()['status'], 200, 'init')
+
+ self.http(b"""GET / HTTP/1.1""", raw=True, read_timeout=1)
self.stop()
@@ -210,7 +216,9 @@ Connection: close
def test_access_log_partial_4(self):
self.load('empty')
- resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, no_recv=True)
+ self.assertEqual(self.post()['status'], 200, 'init')
+
+ resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, read_timeout=1)
self.stop()