aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-07-05 08:40:21 +0800
committerMatthew Shao <me@matshao.com>2017-07-05 08:40:21 +0800
commitaa01a62df7ce015ba4bf3c5ba9f3074616530496 (patch)
tree4e5a54ecde0e9a354d40c654fd3d2a5bcc9cdb45 /test
parent2e6f56c4e7de1d375eb91e188c3697383b31638f (diff)
downloadmitmproxy-aa01a62df7ce015ba4bf3c5ba9f3074616530496.tar.gz
mitmproxy-aa01a62df7ce015ba4bf3c5ba9f3074616530496.tar.bz2
mitmproxy-aa01a62df7ce015ba4bf3c5ba9f3074616530496.zip
[web] Add keys argument for dump_dict in optmanager.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_optmanager.py1
-rw-r--r--test/mitmproxy/tools/web/test_app.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/test/mitmproxy/test_optmanager.py b/test/mitmproxy/test_optmanager.py
index 0c400683..7b4ffb8b 100644
--- a/test/mitmproxy/test_optmanager.py
+++ b/test/mitmproxy/test_optmanager.py
@@ -341,6 +341,7 @@ def test_dump_defaults():
def test_dump_dicts():
o = options.Options()
assert optmanager.dump_dicts(o)
+ assert optmanager.dump_dicts(o, ['http2', 'anticomp'])
class TTypes(optmanager.OptManager):
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py
index e6d563e7..044b4595 100644
--- a/test/mitmproxy/tools/web/test_app.py
+++ b/test/mitmproxy/tools/web/test_app.py
@@ -255,8 +255,8 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
def test_options(self):
j = json(self.fetch("/options"))
- assert type(j) == list
- assert type(j[0]) == dict
+ assert type(j) == dict
+ assert type(j['anticache']) == dict
def test_option_update(self):
assert self.put_json("/options", {"anticache": True}).code == 200