aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-03-07 14:46:28 +1300
committerAldo Cortesi <aldo@nullcube.com>2017-03-07 14:46:28 +1300
commit10db254791480a35028554bc2821b9c8002e26ca (patch)
tree46eee6c996c7769c620c195319f0fa4495db61f8 /test
parentac3b0d69cc29b5469f6b4cc55af528f6266d42cf (diff)
downloadmitmproxy-10db254791480a35028554bc2821b9c8002e26ca.tar.gz
mitmproxy-10db254791480a35028554bc2821b9c8002e26ca.tar.bz2
mitmproxy-10db254791480a35028554bc2821b9c8002e26ca.zip
Remove less commonly used command-line options
We now have --set, so only options that really deserve it get a dedicated flag. I'm inclined to strip this back even more. Feel free to argue that YOUR favourite option deserves special treatment here.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_proxy.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py
index 6afda18c..7a49c530 100644
--- a/test/mitmproxy/test_proxy.py
+++ b/test/mitmproxy/test_proxy.py
@@ -1,4 +1,3 @@
-import os
import argparse
from unittest import mock
from OpenSSL import SSL
@@ -46,19 +45,6 @@ class TestProcessProxyOptions:
def test_simple(self):
assert self.p()
- def test_cadir(self):
- with tutils.tmpdir() as cadir:
- self.assert_noerr("--cadir", cadir)
-
- def test_client_certs(self):
- with tutils.tmpdir() as cadir:
- self.assert_noerr("--client-certs", cadir)
- self.assert_noerr(
- "--client-certs",
- os.path.join(tutils.test_data.path("mitmproxy/data/clientcert"), "client.pem"))
- with pytest.raises(Exception, match="path does not exist"):
- self.p("--client-certs", "nonexistent")
-
def test_certs(self):
self.assert_noerr(
"--cert",
@@ -70,16 +56,6 @@ class TestProcessProxyOptions:
p = self.assert_noerr("--ssl-insecure")
assert p.openssl_verification_mode_server == SSL.VERIFY_NONE
- def test_upstream_trusted_cadir(self):
- expected_dir = "/path/to/a/ca/dir"
- p = self.assert_noerr("--ssl-verify-upstream-trusted-cadir", expected_dir)
- assert p.options.ssl_verify_upstream_trusted_cadir == expected_dir
-
- def test_upstream_trusted_ca(self):
- expected_file = "/path/to/a/cert/file"
- p = self.assert_noerr("--ssl-verify-upstream-trusted-ca", expected_file)
- assert p.options.ssl_verify_upstream_trusted_ca == expected_file
-
class TestProxyServer: