aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_protocol_http2.py4
-rw-r--r--test/mitmproxy/test_proxy.py6
-rw-r--r--test/mitmproxy/test_server.py7
-rw-r--r--test/mitmproxy/tservers.py5
4 files changed, 8 insertions, 14 deletions
diff --git a/test/mitmproxy/test_protocol_http2.py b/test/mitmproxy/test_protocol_http2.py
index e8866643..a7a3ba3f 100644
--- a/test/mitmproxy/test_protocol_http2.py
+++ b/test/mitmproxy/test_protocol_http2.py
@@ -106,9 +106,7 @@ class _Http2TestBase(object):
def get_proxy_config(cls):
opts = options.Options(listen_port=0, no_upstream_cert=False)
opts.cadir = os.path.join(tempfile.gettempdir(), "mitmproxy")
- d = dict(
- authenticator=None,
- )
+ d = dict()
return d, opts
@property
diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py
index 5cceb8c2..4127a889 100644
--- a/test/mitmproxy/test_proxy.py
+++ b/test/mitmproxy/test_proxy.py
@@ -103,7 +103,11 @@ class TestProcessProxyOptions:
# self.assert_err("mutually exclusive", "-R", "http://localhost", "-T")
def test_socks_auth(self):
- self.assert_err("Proxy Authentication not supported in SOCKS mode.", "--socks", "--nonanonymous")
+ self.assert_err(
+ "Proxy Authentication not supported in SOCKS mode.",
+ "--socks",
+ "--nonanonymous"
+ )
def test_client_certs(self):
with tutils.tmpdir() as cadir:
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py
index f036fefd..b8b057fd 100644
--- a/test/mitmproxy/test_server.py
+++ b/test/mitmproxy/test_server.py
@@ -298,13 +298,8 @@ class TestHTTP(tservers.HTTPProxyTest, CommonMixin, AppMixin):
class TestHTTPAuth(tservers.HTTPProxyTest):
- authenticator = http.authentication.BasicProxyAuth(
- http.authentication.PassManSingleUser(
- "test",
- "test"),
- "realm")
-
def test_auth(self):
+ self.master.options.auth_singleuser = "test:test"
assert self.pathod("202").status_code == 407
p = self.pathoc()
ret = p.request("""
diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py
index 8df30e34..495765da 100644
--- a/test/mitmproxy/tservers.py
+++ b/test/mitmproxy/tservers.py
@@ -78,7 +78,6 @@ class ProxyTestBase(object):
ssl = None
ssloptions = False
no_upstream_cert = False
- authenticator = None
masterclass = TestMaster
add_upstream_certs_to_client_chain = False
@@ -120,9 +119,7 @@ class ProxyTestBase(object):
@classmethod
def get_proxy_config(cls):
cls.cadir = os.path.join(tempfile.gettempdir(), "mitmproxy")
- cnf = dict(
- authenticator = cls.authenticator,
- )
+ cnf = dict()
return cnf, options.Options(
listen_port=0,
cadir=cls.cadir,