aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-03-02 22:15:53 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-03-02 22:15:53 +1300
commit32af66881465ae98a53665c8ddd42c02aaf492f7 (patch)
tree8984887a813e48cd0f64e8e9896f6889f27a9287 /test
parent875f5f8cb65a254c40816e7cda0e4be96384ac16 (diff)
downloadmitmproxy-32af66881465ae98a53665c8ddd42c02aaf492f7.tar.gz
mitmproxy-32af66881465ae98a53665c8ddd42c02aaf492f7.tar.bz2
mitmproxy-32af66881465ae98a53665c8ddd42c02aaf492f7.zip
Minor cleanups.
Diffstat (limited to 'test')
-rw-r--r--test/test_server.py3
-rw-r--r--test/tservers.py4
2 files changed, 3 insertions, 4 deletions
diff --git a/test/test_server.py b/test/test_server.py
index e31fb589..2714ef52 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -377,7 +377,6 @@ class TestTransparentResolveError(tservers.TransparentProxTest):
assert self.pathod("304").status_code == 502
-
class MasterIncomplete(tservers.TestMaster):
def handle_request(self, m):
resp = tutils.tresp()
@@ -390,5 +389,3 @@ class TestIncompleteResponse(tservers.HTTPProxTest):
def test_incomplete(self):
assert self.pathod("200").status_code == 502
-
-
diff --git a/test/tservers.py b/test/tservers.py
index a0f37c98..540cda60 100644
--- a/test/tservers.py
+++ b/test/tservers.py
@@ -28,7 +28,6 @@ class TestMaster(flow.FlowMaster):
self.apps.add(testapp, "testapp", 80)
self.apps.add(errapp, "errapp", 80)
self.clear_log()
- self.start_app(APP_HOST, APP_PORT, False)
def handle_request(self, m):
flow.FlowMaster.handle_request(self, m)
@@ -77,6 +76,7 @@ class ProxTestBase(object):
no_upstream_cert = False
authenticator = None
masterclass = TestMaster
+ externalapp = False
@classmethod
def setupAll(cls):
cls.server = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions)
@@ -89,6 +89,7 @@ class ProxTestBase(object):
**pconf
)
tmaster = cls.masterclass(config)
+ tmaster.start_app(APP_HOST, APP_PORT, cls.externalapp)
cls.proxy = ProxyThread(tmaster)
cls.proxy.start()
@@ -266,6 +267,7 @@ class ChainProxTest(ProxTestBase):
cls.chain[-1].port
)
tmaster = cls.masterclass(config)
+ tmaster.start_app(APP_HOST, APP_PORT, cls.externalapp)
cls.chain.append(ProxyThread(tmaster))
cls.chain[-1].start()