aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_proxy.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-06 12:42:52 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-06 12:42:52 +0200
commit0e0cff638c1e055275e77e2af0ae540542f77197 (patch)
treeba66312a2b8f91281eea0ca8cc77ce9685e9868b /test/test_proxy.py
parent1135666ee6fb145491eb6d07435eb0cf58b2094f (diff)
parent3a8f6488074ed7adf596637b77356553ccfca575 (diff)
downloadmitmproxy-0e0cff638c1e055275e77e2af0ae540542f77197.tar.gz
mitmproxy-0e0cff638c1e055275e77e2af0ae540542f77197.tar.bz2
mitmproxy-0e0cff638c1e055275e77e2af0ae540542f77197.zip
Merge branch 'master' into issue_341
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 91e4954f..2e206529 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -69,12 +69,24 @@ class TestProcessProxyOptions:
def test_no_transparent(self):
self.assert_err("transparent mode not supported", "-T")
+
@mock.patch("libmproxy.platform.resolver")
- def test_transparent_reverse(self, _):
- self.assert_err("mutually exclusive", "-R", "http://localhost", "-T")
- self.assert_noerr("-T")
- self.assert_err("Invalid server specification", "-R", "reverse")
+ def test_modes(self, _):
self.assert_noerr("-R", "http://localhost")
+ self.assert_err("expected one argument", "-R")
+ self.assert_err("Invalid server specification", "-R", "reverse")
+
+ self.assert_noerr("-T")
+
+ self.assert_noerr("-U", "http://localhost")
+ self.assert_err("expected one argument", "-U")
+ self.assert_err("Invalid server specification", "-U", "upstream")
+
+ self.assert_noerr("--destination-server", "http://localhost")
+ self.assert_err("expected one argument", "--destination-server")
+ self.assert_err("Invalid server specification", "--destination-server", "manual")
+
+ self.assert_err("mutually exclusive", "-R", "http://localhost", "-T")
def test_client_certs(self):
with tutils.tmpdir() as confdir: