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/tutils.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/tutils.py')
-rw-r--r-- | test/pathod/tutils.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/pathod/tutils.py b/test/pathod/tutils.py index 3a94b6eb..518485ba 100644 --- a/test/pathod/tutils.py +++ b/test/pathod/tutils.py @@ -2,9 +2,8 @@ import tempfile import re import shutil import requests -from six.moves import cStringIO as StringIO -from six.moves import urllib -from six import BytesIO +import io +import urllib from netlib import tcp from netlib import utils @@ -20,7 +19,7 @@ def treader(bytes): """ Construct a tcp.Read object from bytes. """ - fp = BytesIO(bytes) + fp = io.BytesIO(bytes) return tcp.Reader(fp) @@ -79,7 +78,7 @@ class DaemonTests(object): return resp def getpath(self, path, params=None): - logfp = StringIO() + logfp = io.StringIO() c = pathoc.Pathoc( ("localhost", self.d.port), ssl=self.ssl, @@ -92,7 +91,7 @@ class DaemonTests(object): return resp def get(self, spec): - logfp = StringIO() + logfp = io.StringIO() c = pathoc.Pathoc( ("localhost", self.d.port), ssl=self.ssl, @@ -118,7 +117,7 @@ class DaemonTests(object): """ if ssl is None: ssl = self.ssl - logfp = StringIO() + logfp = io.StringIO() c = pathoc.Pathoc( ("localhost", self.d.port), ssl=ssl, @@ -148,6 +147,6 @@ test_data = utils.Data(__name__) def render(r, settings=language.Settings()): r = r.resolve(settings) - s = BytesIO() + s = io.BytesIO() assert language.serve(r, s, settings) return s.getvalue() |