diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-09 20:59:35 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-09 20:59:35 +0300 |
commit | 29b4e4431fe43f9ac969a1cdb67478da8c5dcc1e (patch) | |
tree | f1b8944daa883776d672e3ffb7d37009f0004462 /test/test_access_log.py | |
parent | 549f0873c2beed9517fb4006e1f0a63e0019abb3 (diff) | |
download | unit-29b4e4431fe43f9ac969a1cdb67478da8c5dcc1e.tar.gz unit-29b4e4431fe43f9ac969a1cdb67478da8c5dcc1e.tar.bz2 |
Tests: speed up tests.
Diffstat (limited to '')
-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() |