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_http2.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_http2.py')
-rw-r--r-- | test/pathod/test_language_http2.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/pathod/test_language_http2.py b/test/pathod/test_language_http2.py index f4b34047..11e100ac 100644 --- a/test/pathod/test_language_http2.py +++ b/test/pathod/test_language_http2.py @@ -1,4 +1,4 @@ -from six import BytesIO +import io from netlib import tcp from netlib.http import user_agents @@ -26,7 +26,7 @@ def default_settings(): def test_make_error_response(): - d = BytesIO() + d = io.BytesIO() s = http2.make_error_response("foo", "bar") language.serve(s, d, default_settings()) @@ -85,7 +85,7 @@ class TestRequest: assert r[1].method.string() == b"GET" def test_render_simple(self): - s = BytesIO() + s = io.BytesIO() r = parse_request("GET:'/foo'") assert language.serve( r, @@ -127,7 +127,7 @@ class TestRequest: assert r.headers[0].values(default_settings()) == (b"user-agent", user_agents.get_by_shortcut('a')[2].encode()) def test_render_with_headers(self): - s = BytesIO() + s = io.BytesIO() r = parse_request('GET:/foo:h"foo"="bar"') assert language.serve( r, @@ -143,7 +143,7 @@ class TestRequest: assert r.values(default_settings()) def test_render_with_body(self): - s = BytesIO() + s = io.BytesIO() r = parse_request("GET:'/foo':bfoobar") assert language.serve( r, @@ -200,7 +200,7 @@ class TestResponse: assert r.body.string() == b"foobar" def test_render_simple(self): - s = BytesIO() + s = io.BytesIO() r = parse_response('200') assert language.serve( r, @@ -209,7 +209,7 @@ class TestResponse: ) def test_render_with_headers(self): - s = BytesIO() + s = io.BytesIO() r = parse_response('200:h"foo"="bar"') assert language.serve( r, @@ -218,7 +218,7 @@ class TestResponse: ) def test_render_with_body(self): - s = BytesIO() + s = io.BytesIO() r = parse_response('200:bfoobar') assert language.serve( r, |