aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-17 15:16:12 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-17 15:16:12 +0200
commit8d71059d77c2dd1d9858d7971dd0b6b4387ed9f4 (patch)
tree831f47cfd19e7d58c0f31b0a924832d421d4eb52 /test/test_utils.py
parenta07e43df8b3988f137b48957f978ad570d9dc782 (diff)
downloadmitmproxy-8d71059d77c2dd1d9858d7971dd0b6b4387ed9f4.tar.gz
mitmproxy-8d71059d77c2dd1d9858d7971dd0b6b4387ed9f4.tar.bz2
mitmproxy-8d71059d77c2dd1d9858d7971dd0b6b4387ed9f4.zip
clean up http message models
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index eb7aa31a..0db75578 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -103,11 +103,11 @@ def test_get_header_tokens():
headers = Headers()
assert utils.get_header_tokens(headers, "foo") == []
headers["foo"] = "bar"
- assert utils.get_header_tokens(headers, "foo") == ["bar"]
+ assert utils.get_header_tokens(headers, "foo") == [b"bar"]
headers["foo"] = "bar, voing"
- assert utils.get_header_tokens(headers, "foo") == ["bar", "voing"]
+ assert utils.get_header_tokens(headers, "foo") == [b"bar", b"voing"]
headers.set_all("foo", ["bar, voing", "oink"])
- assert utils.get_header_tokens(headers, "foo") == ["bar", "voing", "oink"]
+ assert utils.get_header_tokens(headers, "foo") == [b"bar", b"voing", b"oink"]
def test_multipartdecode():
@@ -134,8 +134,8 @@ def test_multipartdecode():
def test_parse_content_type():
p = utils.parse_content_type
- assert p("text/html") == ("text", "html", {})
- assert p("text") is None
+ assert p(b"text/html") == (b"text", b"html", {})
+ assert p(b"text") is None
- v = p("text/html; charset=UTF-8")
- assert v == ('text', 'html', {'charset': 'UTF-8'})
+ v = p(b"text/html; charset=UTF-8")
+ assert v == (b'text', b'html', {b'charset': b'UTF-8'})