aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-01-18 14:52:19 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-01-18 14:52:19 +1300
commit0f406e9daa3a0cbaf65954266969406900811280 (patch)
tree527d83a3573bc4ca9589d760c1828689262fe615
parent7a79eeb143e380c44bdfb1dd3fc5056c91c0c3d4 (diff)
downloadmitmproxy-0f406e9daa3a0cbaf65954266969406900811280.tar.gz
mitmproxy-0f406e9daa3a0cbaf65954266969406900811280.tar.bz2
mitmproxy-0f406e9daa3a0cbaf65954266969406900811280.zip
Speed up the test suite by reducing time sleeping in tests.
-rw-r--r--test/test_server.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 3686a6a8..558e7cca 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -108,21 +108,20 @@ class TestProxy(tutils.HTTPProxTest):
# call pathod server, wait a second to complete the request
connection.send("GET http://localhost:%d/p/304:b@1k HTTP/1.1\r\n"%self.server.port)
- time.sleep(2.1)
+ time.sleep(0.1)
connection.send("\r\n");
connection.recv(50000)
connection.close()
request, response = self.master.state.view[0].request, self.master.state.view[0].response
assert response.code == 304 # sanity test for our low level request
- assert 2 <= request.timestamp_end - request.timestamp_start <= 2.2
+ assert 0 <= request.timestamp_end - request.timestamp_start <= 0.2
def test_request_timestamps_not_affected_by_client_time(self):
# test that don't include user wait time in request's timestamps
f = self.pathod("304:b@10k")
assert f.status_code == 304
- time.sleep(1)
f = self.pathod("304:b@10k")
assert f.status_code == 304