diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-21 20:50:41 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-21 20:50:41 +1200 |
commit | 7a49cdfef3d9f5eeaecf6d6c8938f0bb8da7c15d (patch) | |
tree | c72cd520b3249591d107c707cc12f7023522b1e2 /test/test_pathod.py | |
parent | 86fe199988801232f209b7e39a2910065bf5db5f (diff) | |
download | mitmproxy-7a49cdfef3d9f5eeaecf6d6c8938f0bb8da7c15d.tar.gz mitmproxy-7a49cdfef3d9f5eeaecf6d6c8938f0bb8da7c15d.tar.bz2 mitmproxy-7a49cdfef3d9f5eeaecf6d6c8938f0bb8da7c15d.zip |
More robust response handling.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r-- | test/test_pathod.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index a23b7c71..1484efcd 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -64,11 +64,13 @@ class _DaemonTests: scheme = "https" if self.SSL else "http" return requests.get("%s://localhost:%s/p/%s"%(scheme, self.d.port, spec), verify=False) - def pathoc(self, spec): + def pathoc(self, spec, timeout=None): c = pathoc.Pathoc("localhost", self.d.port) c.connect() if self.SSL: c.convert_to_ssl() + if timeout: + c.settimeout(timeout) return c.request(spec) def test_preline(self): @@ -114,6 +116,7 @@ class _DaemonTests: assert "foo" in l["msg"] + class TestDaemon(_DaemonTests): SSL = False |