aboutsummaryrefslogtreecommitdiffstats
path: root/test/tservers.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-01-27 10:12:18 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-01-27 10:36:28 +0100
commit8c375383148f100f03aed52827ac513f145078c2 (patch)
treedbae3b5d4d603e5e226477f1938119e2acfcfc1f /test/tservers.py
parentc2bb29f669cd80509f4efe205551a9cf5fc29770 (diff)
downloadmitmproxy-8c375383148f100f03aed52827ac513f145078c2.tar.gz
mitmproxy-8c375383148f100f03aed52827ac513f145078c2.tar.bz2
mitmproxy-8c375383148f100f03aed52827ac513f145078c2.zip
code formatting: fix whitespace issues
Diffstat (limited to 'test/tservers.py')
-rw-r--r--test/tservers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/tservers.py b/test/tservers.py
index c5b23854..dbc9f7d0 100644
--- a/test/tservers.py
+++ b/test/tservers.py
@@ -29,6 +29,7 @@ def errapp(environ, start_response):
class TestMaster(flow.FlowMaster):
+
def __init__(self, config):
config.port = 0
s = ProxyServer(config)
@@ -55,6 +56,7 @@ class TestMaster(flow.FlowMaster):
class ProxyThread(threading.Thread):
+
def __init__(self, tmaster):
threading.Thread.__init__(self)
self.tmaster = tmaster
@@ -131,6 +133,7 @@ class ProxTestBase(object):
class HTTPProxTest(ProxTestBase):
+
def pathoc_raw(self):
return libpathod.pathoc.Pathoc(("127.0.0.1", self.proxy.port), fp=None)
@@ -172,12 +175,14 @@ class HTTPProxTest(ProxTestBase):
class TResolver:
+
def __init__(self, port):
self.port = port
def original_addr(self, sock):
return ("127.0.0.1", self.port)
+
class TransparentProxTest(ProxTestBase):
ssl = None
resolver = TResolver
@@ -263,6 +268,7 @@ class ReverseProxTest(ProxTestBase):
class SocksModeTest(HTTPProxTest):
+
@classmethod
def get_proxy_config(cls):
d = ProxTestBase.get_proxy_config()
@@ -271,6 +277,7 @@ class SocksModeTest(HTTPProxTest):
class ChainProxTest(ProxTestBase):
+
"""
Chain three instances of mitmproxy in a row to test upstream mode.
Proxy order is cls.proxy -> cls.chain[0] -> cls.chain[1]