diff options
author | Matthew Shao <me@matshao.com> | 2017-06-13 23:03:07 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-06-13 23:03:07 +0800 |
commit | 2c0f6c202321a9d332dbe0181d319a3be4fd2614 (patch) | |
tree | 346f0c4c9102b0c0ec6f4af4e241bc683fe7dcc5 /test | |
parent | 03bb0a09b95d1942a62435545d867b0888de75fa (diff) | |
download | mitmproxy-2c0f6c202321a9d332dbe0181d319a3be4fd2614.tar.gz mitmproxy-2c0f6c202321a9d332dbe0181d319a3be4fd2614.tar.bz2 mitmproxy-2c0f6c202321a9d332dbe0181d319a3be4fd2614.zip |
Minor Update and add test.
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/web/test_app.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py index 5427b995..d47b1af0 100644 --- a/test/mitmproxy/tools/web/test_app.py +++ b/test/mitmproxy/tools/web/test_app.py @@ -253,6 +253,11 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): assert self.put_json("/settings", {"anticache": True}).code == 200 assert self.put_json("/settings", {"wtf": True}).code == 400 + def test_options(self): + j = json(self.fetch("/options")) + assert type(j) == list + assert type(j[0]) == dict + def test_err(self): with mock.patch("mitmproxy.tools.web.app.IndexHandler.get") as f: f.side_effect = RuntimeError |