diff options
author | yonder <kzxiao.hy@gmail.com> | 2016-03-04 11:12:03 -0500 |
---|---|---|
committer | yonder <kzxiao.hy@gmail.com> | 2016-03-04 11:12:03 -0500 |
commit | 0e27dfd9c132e1f8768ae33a33ae8a1c55541948 (patch) | |
tree | eb39a3224d6dffbbcb0550ff3ca16c4c72e288c2 /test | |
parent | b8ae666c78aef9a6ef0e67179d38980247d0e1a5 (diff) | |
download | mitmproxy-0e27dfd9c132e1f8768ae33a33ae8a1c55541948.tar.gz mitmproxy-0e27dfd9c132e1f8768ae33a33ae8a1c55541948.tar.bz2 mitmproxy-0e27dfd9c132e1f8768ae33a33ae8a1c55541948.zip |
Improve test case
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_cmdline.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mitmproxy/test_cmdline.py b/test/mitmproxy/test_cmdline.py index 1546bb41..e75b7baf 100644 --- a/test/mitmproxy/test_cmdline.py +++ b/test/mitmproxy/test_cmdline.py @@ -56,8 +56,12 @@ def test_parse_server_spec(): def test_parse_upstream_auth(): tutils.raises("Invalid upstream auth specification", cmdline.parse_upstream_auth, "") + tutils.raises("Invalid upstream auth specification", cmdline.parse_upstream_auth, ":") + tutils.raises("Invalid upstream auth specification", cmdline.parse_upstream_auth, ":test") assert cmdline.parse_upstream_auth( "test:test") == "Basic" + " " + base64.b64encode("test:test") + assert cmdline.parse_upstream_auth( + "test:") == "Basic" + " " + base64.b64encode("test:") def test_parse_setheaders(): |