aboutsummaryrefslogtreecommitdiffstats
path: root/test/netlib/test_strutils.py
diff options
context:
space:
mode:
authorShadab Zafar <dufferzafar0@gmail.com>2016-07-09 12:57:55 +0530
committerShadab Zafar <dufferzafar0@gmail.com>2016-07-09 13:28:20 +0530
commit83a1cc5a9a62dbe22bd9e87f496928ae1664da2b (patch)
treefbf2e8a1e5165cfb84d6118a8b0e30650ca15f8f /test/netlib/test_strutils.py
parentbd58230178efac789fabc4e4aa81ae6ad5c4b2b4 (diff)
downloadmitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.tar.gz
mitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.tar.bz2
mitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.zip
Make escape_control_characters handle strings on Py2
Diffstat (limited to 'test/netlib/test_strutils.py')
-rw-r--r--test/netlib/test_strutils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/netlib/test_strutils.py b/test/netlib/test_strutils.py
index 68bfdb94..7c3eacc6 100644
--- a/test/netlib/test_strutils.py
+++ b/test/netlib/test_strutils.py
@@ -38,8 +38,9 @@ def test_escape_control_characters():
u'=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~.'
)
- with tutils.raises(ValueError):
- strutils.escape_control_characters(b"foo")
+ if not six.PY2:
+ with tutils.raises(ValueError):
+ strutils.escape_control_characters(b"foo")
def test_bytes_to_escaped_str():