diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-26 20:01:51 +1200 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-26 20:01:51 +1200 |
| commit | 3e158211a830bbcba2dd463189a79ec3ad17c8d4 (patch) | |
| tree | b61133ad71a153d77289b408f886de42f79d56b0 /test | |
| parent | b879890412041e7364a294151a3a8aef5fb62e48 (diff) | |
| download | mitmproxy-3e158211a830bbcba2dd463189a79ec3ad17c8d4.tar.gz mitmproxy-3e158211a830bbcba2dd463189a79ec3ad17c8d4.tar.bz2 mitmproxy-3e158211a830bbcba2dd463189a79ec3ad17c8d4.zip | |
Add a --nohang flag that turns off pauses in response generation.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_pathod.py | 9 | ||||
| -rw-r--r-- | test/tutils.py | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index 036fbf0b..d6e2e886 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -43,6 +43,15 @@ class TestNoApi(tutils.DaemonTests): assert not "Log" in r.content +class TestNohang(tutils.DaemonTests): + nohang = True + def test_nohang(self): + r = self.get("200:p0,0") + assert r.status_code == 800 + l = self.d.log()[0] + assert "Pauses have been disabled" in l["response"]["error"] + + class CommonTests(tutils.DaemonTests): def test_sizelimit(self): r = self.get("200:b@1g") diff --git a/test/tutils.py b/test/tutils.py index 1eb78980..d9e543a1 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -6,6 +6,7 @@ import requests class DaemonTests: noweb = False noapi = False + nohang = False ssl = False @classmethod def setUpAll(self): @@ -15,7 +16,8 @@ class DaemonTests: ssl = self.ssl, sizelimit=1*1024*1024, noweb = self.noweb, - noapi = self.noapi + noapi = self.noapi, + nohang = self.nohang ) @classmethod |
