diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-07-18 18:10:21 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-07-19 16:25:09 +1200 |
commit | f9622074ccdfafda384fa3a1466d8363c2a65244 (patch) | |
tree | ac262a4019c5014405324ff2883b47a0e5f15426 /test/mitmproxy/test_server.py | |
parent | bd733e12323b02491090e531b6743da0a34b56c6 (diff) | |
download | mitmproxy-f9622074ccdfafda384fa3a1466d8363c2a65244.tar.gz mitmproxy-f9622074ccdfafda384fa3a1466d8363c2a65244.tar.bz2 mitmproxy-f9622074ccdfafda384fa3a1466d8363c2a65244.zip |
ProxyConfig: mode, upstream_server and upstream_auth to Options
Diffstat (limited to 'test/mitmproxy/test_server.py')
-rw-r--r-- | test/mitmproxy/test_server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py index 20372c92..ca3f8a97 100644 --- a/test/mitmproxy/test_server.py +++ b/test/mitmproxy/test_server.py @@ -15,7 +15,7 @@ from pathod import pathoc, pathod from mitmproxy.builtins import script from mitmproxy import controller -from mitmproxy.proxy.config import HostMatcher +from mitmproxy.proxy.config import HostMatcher, parse_server_spec from mitmproxy.models import Error, HTTPResponse, HTTPFlow from . import tutils, tservers @@ -485,7 +485,8 @@ class TestHttps2Http(tservers.ReverseProxyTest): @classmethod def get_proxy_config(cls): d, opts = super(TestHttps2Http, cls).get_proxy_config() - d["upstream_server"] = ("http", d["upstream_server"][1]) + s = parse_server_spec(opts.upstream_server) + opts.upstream_server = "http://%s" % s.address.decode("ascii") return d, opts def pathoc(self, ssl, sni=None): |