aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/tutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathod/tutils.py')
-rw-r--r--test/pathod/tutils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pathod/tutils.py b/test/pathod/tutils.py
index bf5e3165..daaa8628 100644
--- a/test/pathod/tutils.py
+++ b/test/pathod/tutils.py
@@ -3,8 +3,8 @@ import re
import shutil
import requests
from six.moves import cStringIO as StringIO
+from six.moves import urllib
from six import BytesIO
-import urllib
from netlib import tcp
from netlib import utils
@@ -20,7 +20,7 @@ def treader(bytes):
"""
Construct a tcp.Read object from bytes.
"""
- fp = StringIO(bytes)
+ fp = BytesIO(bytes)
return tcp.Reader(fp)
@@ -87,7 +87,7 @@ class DaemonTests(object):
)
with c.connect():
if params:
- path = path + "?" + urllib.urlencode(params)
+ path = path + "?" + urllib.parse.urlencode(params)
resp = c.request("get:%s" % path)
return resp
@@ -100,7 +100,7 @@ class DaemonTests(object):
)
with c.connect():
resp = c.request(
- "get:/p/%s" % urllib.quote(spec).encode("string_escape")
+ "get:/p/%s" % urllib.parse.quote(spec).encode("string_escape")
)
return resp