diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/web/test_app.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/utils/test_typecheck.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py index 401f9fe6..e6d563e7 100644 --- a/test/mitmproxy/tools/web/test_app.py +++ b/test/mitmproxy/tools/web/test_app.py @@ -261,6 +261,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): def test_option_update(self): assert self.put_json("/options", {"anticache": True}).code == 200 assert self.put_json("/options", {"wtf": True}).code == 400 + assert self.put_json("/options", {"anticache": "foo"}).code == 400 def test_err(self): with mock.patch("mitmproxy.tools.web.app.IndexHandler.get") as f: diff --git a/test/mitmproxy/utils/test_typecheck.py b/test/mitmproxy/utils/test_typecheck.py index 8e4198da..66b1884e 100644 --- a/test/mitmproxy/utils/test_typecheck.py +++ b/test/mitmproxy/utils/test_typecheck.py @@ -115,7 +115,7 @@ def test_check_command_type(): def test_typesec_to_str(): assert(typecheck.typespec_to_str(str)) == "str" - assert(typecheck.typespec_to_str(typing.Sequence[str])) == "Sequence" - assert(typecheck.typespec_to_str(typing.Optional[str])) == "Union" + assert(typecheck.typespec_to_str(typing.Sequence[str])) == "sequence of str" + assert(typecheck.typespec_to_str(typing.Optional[str])) == "optional str" with pytest.raises(NotImplementedError): typecheck.typespec_to_str(dict) |