diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-10-17 17:03:02 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-17 17:03:02 +1300 |
commit | ae3ff8ee1edc646e7a640219df1a312c27f7c339 (patch) | |
tree | 490697113ceaf12cc704c418357139e60a0190f3 /test/pathod/test_language_http.py | |
parent | 3fbce7e981cab5d20b3ef17a50f14b34e8c60fa3 (diff) | |
parent | ce98a9219e060b729d4b0d2dc28bf4510649f0fd (diff) | |
download | mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.tar.gz mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.tar.bz2 mitmproxy-ae3ff8ee1edc646e7a640219df1a312c27f7c339.zip |
Merge pull request #1615 from cortesi/python3a
exterminate six
Diffstat (limited to 'test/pathod/test_language_http.py')
-rw-r--r-- | test/pathod/test_language_http.py | 16 |
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()) |