aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/test_models.py
diff options
context:
space:
mode:
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()