diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-26 12:09:39 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-26 12:09:39 -0700 |
commit | 22ecd022a84e1c3762dd425bc9bee2230e393d8d (patch) | |
tree | 47f7cac0e86c715bc32e955072fbe59f06d589cf /test | |
parent | d149c447fe9d3ec359271270ed1c32c2c7da6aad (diff) | |
parent | 92317bc81d72f243095a1bfa192f568637d9bc32 (diff) | |
download | mitmproxy-22ecd022a84e1c3762dd425bc9bee2230e393d8d.tar.gz mitmproxy-22ecd022a84e1c3762dd425bc9bee2230e393d8d.tar.bz2 mitmproxy-22ecd022a84e1c3762dd425bc9bee2230e393d8d.zip |
Merge pull request #1119 from dufferzafar/pathod-port
Python 3 - pathod.utils
Diffstat (limited to 'test')
-rw-r--r-- | test/pathod/test_utils.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/pathod/test_utils.py b/test/pathod/test_utils.py index 4dcedf6e..8026a576 100644 --- a/test/pathod/test_utils.py +++ b/test/pathod/test_utils.py @@ -1,6 +1,8 @@ from pathod import utils import tutils +import six + def test_membool(): m = utils.MemBool() @@ -27,13 +29,10 @@ def test_data_path(): tutils.raises(ValueError, utils.data.path, "nonexistent") -def test_inner_repr(): - assert utils.inner_repr("\x66") == "\x66" - assert utils.inner_repr(u"foo") == "foo" - - def test_escape_unprintables(): - s = "".join([chr(i) for i in range(255)]) + 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 not "PATHOD_MARKER" in e + assert "PATHOD_MARKER" not in e |