aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-10-01 12:01:02 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-10-01 12:01:02 +1300
commit915bcfbd305d7b18de07f4f40dab1e49a06b132c (patch)
tree1b2e0226e9ad9e3a5ac97d643886faa80740b113 /test/test_pathod.py
parent8bb81be2b07b4b93a8ec7c088bf1ff4728fcec21 (diff)
downloadmitmproxy-915bcfbd305d7b18de07f4f40dab1e49a06b132c.tar.gz
mitmproxy-915bcfbd305d7b18de07f4f40dab1e49a06b132c.tar.bz2
mitmproxy-915bcfbd305d7b18de07f4f40dab1e49a06b132c.zip
Add timeout argument to Pathod, and matching -t command-line option.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 9c205d4f..429c2ef9 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -34,6 +34,15 @@ class TestNoWeb(tutils.DaemonTests):
assert self.getpath("/").status_code == 800
+class TestTimeout(tutils.DaemonTests):
+ timeout = 0.1
+ def test_noweb(self):
+ # FIXME: Add float values to spec language, reduce test timeout to
+ # increase test performance
+ assert self.get("200:p1,1").status_code == 200
+ assert self.d.last_log()["type"] == "timeout"
+
+
class TestNoApi(tutils.DaemonTests):
noapi = True
def test_noapi(self):