aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod
diff options
context:
space:
mode:
authorShadab Zafar <dufferzafar0@gmail.com>2016-05-26 22:19:58 +0530
committerShadab Zafar <dufferzafar0@gmail.com>2016-05-26 23:07:37 +0530
commitbc6cd13356a5181baafc9b01385a21991695ade3 (patch)
tree08eae41996180b3d1386f11fa9d32600e983dd3e /test/pathod
parent4ec56808ddfc6e6c03ce916ca35b0d7439165650 (diff)
downloadmitmproxy-bc6cd13356a5181baafc9b01385a21991695ade3.tar.gz
mitmproxy-bc6cd13356a5181baafc9b01385a21991695ade3.tar.bz2
mitmproxy-bc6cd13356a5181baafc9b01385a21991695ade3.zip
Go Python 3 by default with the bytes conversion
Diffstat (limited to 'test/pathod')
-rw-r--r--test/pathod/test_utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/pathod/test_utils.py b/test/pathod/test_utils.py
index 32ba3bdf..8026a576 100644
--- a/test/pathod/test_utils.py
+++ b/test/pathod/test_utils.py
@@ -30,7 +30,9 @@ def test_data_path():
def test_escape_unprintables():
- s = "".join([chr(i) for i in range(255)])
- e = utils.escape_unprintables(six.b(s))
+ s = bytes(range(256))
+ if six.PY2:
+ s = "".join([chr(i) for i in range(255)])
+ e = utils.escape_unprintables(s)
assert e.encode('ascii')
assert "PATHOD_MARKER" not in e