aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_language_http.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathod/test_language_http.py')
-rw-r--r--test/pathod/test_language_http.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/pathod/test_language_http.py b/test/pathod/test_language_http.py
index dd0b8d02..e1eabe4a 100644
--- a/test/pathod/test_language_http.py
+++ b/test/pathod/test_language_http.py
@@ -1,4 +1,4 @@
-from six import BytesIO
+import io
from pathod import language
from pathod.language import http, base
@@ -10,7 +10,7 @@ def parse_request(s):
def test_make_error_response():
- d = BytesIO()
+ d = io.BytesIO()
s = http.make_error_response("foo")
language.serve(s, d, {})
@@ -76,7 +76,7 @@ class TestRequest:
assert r[0].values({})
def test_render(self):
- s = BytesIO()
+ s = io.BytesIO()
r = parse_request("GET:'/foo'")
assert language.serve(
r,
@@ -163,7 +163,7 @@ class TestResponse:
assert b"OK" in [i[:] for i in r.preamble({})]
def test_render(self):
- s = BytesIO()
+ s = io.BytesIO()
r = next(language.parse_pathod("400:m'msg'"))
assert language.serve(r, s, {})
@@ -173,13 +173,13 @@ class TestResponse:
assert "p0" not in s.spec()
def test_raw(self):
- s = BytesIO()
+ s = io.BytesIO()
r = next(language.parse_pathod("400:b'foo'"))
language.serve(r, s, {})
v = s.getvalue()
assert b"Content-Length" in v
- s = BytesIO()
+ s = io.BytesIO()
r = next(language.parse_pathod("400:b'foo':r"))
language.serve(r, s, {})
v = s.getvalue()
@@ -187,7 +187,7 @@ class TestResponse:
def test_length(self):
def testlen(x):
- s = BytesIO()
+ s = io.BytesIO()
x = next(x)
language.serve(x, s, language.Settings())
assert x.length(language.Settings()) == len(s.getvalue())
@@ -198,7 +198,7 @@ class TestResponse:
def test_maximum_length(self):
def testlen(x):
x = next(x)
- s = BytesIO()
+ s = io.BytesIO()
m = x.maximum_length({})
language.serve(x, s, {})
assert m >= len(s.getvalue())