aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-01-05 20:29:46 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-01-05 20:29:46 +1300
commit5493925ea07aabc569d0f6cddffff49fda59383c (patch)
tree1d62dbecab9c97ad1de1349157c1e2dc83fb8121 /test/test_pathod.py
parentc744ef2dcbb95182668ed8897542029c6c6734b9 (diff)
downloadmitmproxy-5493925ea07aabc569d0f6cddffff49fda59383c.tar.gz
mitmproxy-5493925ea07aabc569d0f6cddffff49fda59383c.tar.bz2
mitmproxy-5493925ea07aabc569d0f6cddffff49fda59383c.zip
CONNECT through proxy mode for pathoc
Also, use this to unit test the pathod CONNECT implementation.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 0936fce3..0463fc55 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -150,6 +150,12 @@ class CommonTests(tutils.DaemonTests):
class TestDaemon(CommonTests):
ssl = False
+ def test_connect(self):
+ v = self.pathoc(r"get:'http://foo.com/p/202':da", connect_to=("localhost", self.d.port), ssl=True)
+ assert v[1] == 202
+
+ def test_connect_err(self):
+ tutils.raises(http.HttpError, self.pathoc, r"get:'http://foo.com/p/202':da", connect_to=("localhost", self.d.port))
class TestDaemonSSL(CommonTests):