diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-23 16:39:25 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-23 16:39:25 +1200 |
commit | 2880fee4e3f80f8748b6a69f1a72aa3a3a5fa922 (patch) | |
tree | 6e5d012051c7e298470390e9238e5c43d39237d7 /test/test_utils.py | |
parent | e354974787db631c6bacc7dd014cb7e2bac5ff9c (diff) | |
download | mitmproxy-2880fee4e3f80f8748b6a69f1a72aa3a3a5fa922.tar.gz mitmproxy-2880fee4e3f80f8748b6a69f1a72aa3a3a5fa922.tar.bz2 mitmproxy-2880fee4e3f80f8748b6a69f1a72aa3a3a5fa922.zip |
Escape unprintable content in preview.
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 8ca2da49..a8f513f8 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -15,3 +15,11 @@ def test_parse_anchor_spec(): def test_data_path(): tutils.raises(ValueError, utils.data.path, "nonexistent") + + +def test_escape_unprintables(): + s = "".join([chr(i) for i in range(255)]) + e = utils.escape_unprintables(s) + assert e.encode('ascii') + assert not "PATHOD_MARKER" in e + |