Tests: speed up tests.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user