aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-12-05 17:49:16 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-12-08 10:21:06 +1300
commita617e3b5f717b95d1ffc8c87dd70712e36445be9 (patch)
tree0970185c4c7530856c5f19c8446b4150bbf5eb07 /test
parentd742d4fb8c8d601c19f7aa5ff746a4167d864f7e (diff)
downloadmitmproxy-a617e3b5f717b95d1ffc8c87dd70712e36445be9.tar.gz
mitmproxy-a617e3b5f717b95d1ffc8c87dd70712e36445be9.tar.bz2
mitmproxy-a617e3b5f717b95d1ffc8c87dd70712e36445be9.zip
Amalgamate all the Options objects
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/console/test_master.py11
-rw-r--r--test/mitmproxy/test_web_app.py3
-rw-r--r--test/mitmproxy/test_web_master.py5
3 files changed, 11 insertions, 8 deletions
diff --git a/test/mitmproxy/console/test_master.py b/test/mitmproxy/console/test_master.py
index eb840187..fb3c2527 100644
--- a/test/mitmproxy/console/test_master.py
+++ b/test/mitmproxy/console/test_master.py
@@ -2,6 +2,7 @@ from mitmproxy.test import tflow
import mitmproxy.test.tutils
from mitmproxy.tools import console
from mitmproxy import proxy
+from mitmproxy import options
from mitmproxy.tools.console import common
from .. import mastertest
@@ -20,14 +21,14 @@ def test_format_keyvals():
def test_options():
- assert console.master.Options(replay_kill_extra=True)
+ assert options.Options(replay_kill_extra=True)
class TestMaster(mastertest.MasterTest):
- def mkmaster(self, **options):
- if "verbosity" not in options:
- options["verbosity"] = 0
- o = console.master.Options(**options)
+ def mkmaster(self, **opts):
+ if "verbosity" not in opts:
+ opts["verbosity"] = 0
+ o = options.Options(**opts)
return console.master.ConsoleMaster(o, proxy.DummyServer())
def test_basic(self):
diff --git a/test/mitmproxy/test_web_app.py b/test/mitmproxy/test_web_app.py
index be195528..2cab5bf4 100644
--- a/test/mitmproxy/test_web_app.py
+++ b/test/mitmproxy/test_web_app.py
@@ -4,6 +4,7 @@ import mock
import tornado.testing
from mitmproxy import exceptions
from mitmproxy import proxy
+from mitmproxy import options
from mitmproxy.test import tflow
from mitmproxy.tools.web import app
from mitmproxy.tools.web import master as webmaster
@@ -17,7 +18,7 @@ def json(resp: httpclient.HTTPResponse):
class TestApp(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
- o = webmaster.Options()
+ o = options.Options()
m = webmaster.WebMaster(o, proxy.DummyServer())
f = tflow.tflow(resp=True)
f.id = "42"
diff --git a/test/mitmproxy/test_web_master.py b/test/mitmproxy/test_web_master.py
index 298b14eb..08dce8f3 100644
--- a/test/mitmproxy/test_web_master.py
+++ b/test/mitmproxy/test_web_master.py
@@ -1,11 +1,12 @@
from mitmproxy.tools.web import master
from mitmproxy import proxy
+from mitmproxy import options
from . import mastertest
class TestWebMaster(mastertest.MasterTest):
- def mkmaster(self, **options):
- o = master.Options(**options)
+ def mkmaster(self, **opts):
+ o = options.Options(**opts)
return master.WebMaster(o, proxy.DummyServer(o))
def test_basic(self):