aboutsummaryrefslogtreecommitdiffstats
path: root/test/tservers.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-08-17 13:30:36 +0200
committerMaximilian Hils <git@maximilianhils.com>2013-08-17 13:30:36 +0200
commit729677cd85cffedec8f481f1b6025f00fb637e13 (patch)
tree39c245643c5a3a48bd14c6e13757148bda54e2f3 /test/tservers.py
parent6fe175913e611097fdfdf0a6b20b1c05909374e1 (diff)
parenta558c016d4430b67d221a369abe0cde1f4a40fce (diff)
downloadmitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.gz
mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.bz2
mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.zip
Merge branch 'master' into 0.10
Diffstat (limited to 'test/tservers.py')
-rw-r--r--test/tservers.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/tservers.py b/test/tservers.py
index 1197fb69..0606bd9c 100644
--- a/test/tservers.py
+++ b/test/tservers.py
@@ -4,6 +4,9 @@ import libpathod.test, libpathod.pathoc
from libmproxy import proxy, flow, controller
import tutils
+APP_DOMAIN = "mitm"
+APP_IP = "1.1.1.1"
+
testapp = flask.Flask(__name__)
@testapp.route("/")
@@ -28,6 +31,7 @@ class TestMaster(flow.FlowMaster):
flow.FlowMaster.__init__(self, s, state)
self.testq = testq
self.clear_log()
+ self.start_app(APP_DOMAIN, APP_IP)
def handle_request(self, m):
flow.FlowMaster.handle_request(self, m)
@@ -85,7 +89,6 @@ class ProxTestBase:
no_upstream_cert = cls.no_upstream_cert,
cacert = tutils.test_data.path("data/serverkey.pem"),
authenticator = cls.authenticator,
- app = True,
**pconf
)
tmaster = cls.masterclass(cls.tqueue, config)
@@ -162,12 +165,12 @@ class HTTPProxTest(ProxTestBase):
if self.ssl:
p = libpathod.pathoc.Pathoc("127.0.0.1", self.proxy.port, True)
print "PRE"
- p.connect((proxy.APP_IP, 80))
+ p.connect((APP_IP, 80))
print "POST"
return p.request("get:'/%s'"%page)
else:
p = self.pathoc()
- return p.request("get:'http://%s/%s'"%(proxy.APP_DOMAIN, page))
+ return p.request("get:'http://%s/%s'"%(APP_DOMAIN, page))
class TResolver: