diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 16:31:50 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-17 16:31:50 +0200 |
commit | d798ed955dab4681a5285024b3648b1a3f13c24e (patch) | |
tree | a95d96953cd7688451c3a515e4b31f0465d6a7d3 /test/test_utils.py | |
parent | 8d71059d77c2dd1d9858d7971dd0b6b4387ed9f4 (diff) | |
download | mitmproxy-d798ed955dab4681a5285024b3648b1a3f13c24e.tar.gz mitmproxy-d798ed955dab4681a5285024b3648b1a3f13c24e.tar.bz2 mitmproxy-d798ed955dab4681a5285024b3648b1a3f13c24e.zip |
python3++
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 0db75578..ff27486c 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -84,10 +84,10 @@ def test_parse_url(): def test_unparse_url(): - assert utils.unparse_url("http", "foo.com", 99, "") == "http://foo.com:99" - assert utils.unparse_url("http", "foo.com", 80, "") == "http://foo.com" - assert utils.unparse_url("https", "foo.com", 80, "") == "https://foo.com:80" - assert utils.unparse_url("https", "foo.com", 443, "") == "https://foo.com" + assert utils.unparse_url(b"http", b"foo.com", 99, b"") == b"http://foo.com:99" + assert utils.unparse_url(b"http", b"foo.com", 80, b"/bar") == b"http://foo.com/bar" + assert utils.unparse_url(b"https", b"foo.com", 80, b"") == b"https://foo.com:80" + assert utils.unparse_url(b"https", b"foo.com", 443, b"") == b"https://foo.com" def test_urlencode(): @@ -122,7 +122,7 @@ def test_multipartdecode(): "--{0}\n" "Content-Disposition: form-data; name=\"field2\"\n\n" "value2\n" - "--{0}--".format(boundary).encode("ascii") + "--{0}--".format(boundary.decode()).encode() ) form = utils.multipartdecode(headers, content) |