aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-07-26 15:16:23 +0800
committerMatthew Shao <me@matshao.com>2017-07-26 15:16:23 +0800
commit4282dc1ac4053d774b0fe6993ae15222fcfe3b3d (patch)
tree9a3d3f5d61e14059c145f661f1f1f42e87c83c3e /test
parentc3cb77adce5c2cdeaaa62cc002281404c5faa729 (diff)
downloadmitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.tar.gz
mitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.tar.bz2
mitmproxy-4282dc1ac4053d774b0fe6993ae15222fcfe3b3d.zip
[web] Update tests.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/tools/test_dump.py2
-rw-r--r--test/mitmproxy/tools/web/test_app.py11
2 files changed, 2 insertions, 11 deletions
diff --git a/test/mitmproxy/tools/test_dump.py b/test/mitmproxy/tools/test_dump.py
index 69a76d2e..597333af 100644
--- a/test/mitmproxy/tools/test_dump.py
+++ b/test/mitmproxy/tools/test_dump.py
@@ -12,7 +12,7 @@ from .. import tservers
class TestDumpMaster(tservers.MasterTest):
def mkmaster(self, flt, **opts):
- o = options.Options(view_filter=flt, verbosity=-1, flow_detail=0, **opts)
+ o = options.Options(view_filter=flt, verbosity='error', flow_detail=0, **opts)
m = dump.DumpMaster(o, proxy.DummyServer(), with_termlog=False, with_dumper=False)
return m
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py
index bb0b1907..119d7b1d 100644
--- a/test/mitmproxy/tools/web/test_app.py
+++ b/test/mitmproxy/tools/web/test_app.py
@@ -264,16 +264,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
assert self.put_json("/options", {"anticache": "foo"}).code == 400
def test_option_dump(self):
- resp = self.fetch("/options/dump")
- assert b"http2: false" in resp.body
-
- assert self.fetch("/options/dump", method="POST", body=b"http2: true").code == 200
- j = json(self.fetch("/options"))
- assert j["http2"]["value"]
-
- resp = self.fetch("/options/dump", method="POST", body=b"wtf: true")
- assert resp.code == 400
- assert resp.body == b"'Unknown options: wtf'"
+ assert self.fetch("/options/dump", method="POST").code == 200
def test_err(self):
with mock.patch("mitmproxy.tools.web.app.IndexHandler.get") as f: