aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/test_models.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-18 18:05:50 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-18 18:05:50 +0200
commit551d9f11e571eac495674f1c23cfd0dfa8af2cb7 (patch)
treef60fd855076260456b24911e4cd301dc0661d65c /test/http/test_models.py
parentd1904c2f52dfc7409ae275bb081f23635c94acc9 (diff)
downloadmitmproxy-551d9f11e571eac495674f1c23cfd0dfa8af2cb7.tar.gz
mitmproxy-551d9f11e571eac495674f1c23cfd0dfa8af2cb7.tar.bz2
mitmproxy-551d9f11e571eac495674f1c23cfd0dfa8af2cb7.zip
experimental: don't interfere with headers
Diffstat (limited to 'test/http/test_models.py')
-rw-r--r--test/http/test_models.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/http/test_models.py b/test/http/test_models.py
index c3ab4d0f..6970a6e4 100644
--- a/test/http/test_models.py
+++ b/test/http/test_models.py
@@ -442,13 +442,16 @@ class TestHeaders(object):
def test_str(self):
headers = Headers(Host="example.com")
- assert bytes(headers) == "Host: example.com\r\n"
+ assert bytes(headers) == b"Host: example.com\r\n"
headers = Headers([
- ["Host", "example.com"],
- ["Accept", "text/plain"]
+ [b"Host", b"example.com"],
+ [b"Accept", b"text/plain"]
])
- assert str(headers) == "Host: example.com\r\nAccept: text/plain\r\n"
+ assert bytes(headers) == b"Host: example.com\r\nAccept: text/plain\r\n"
+
+ headers = Headers()
+ assert bytes(headers) == b""
def test_setitem(self):
headers = Headers()