diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-05-25 18:10:31 -0700 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-05-25 18:10:31 -0700 |
commit | ee2950cd1979e7f5fdc6d5df43d83d0a6a0ce5dc (patch) | |
tree | f23ec4f984f9b15a8ce656113bf17c4cfa0f8d7b /test/test_utils.py | |
parent | a0c63b6108e76d24222b51def69c74fb88d72b0c (diff) | |
download | mitmproxy-ee2950cd1979e7f5fdc6d5df43d83d0a6a0ce5dc.tar.gz mitmproxy-ee2950cd1979e7f5fdc6d5df43d83d0a6a0ce5dc.tar.bz2 mitmproxy-ee2950cd1979e7f5fdc6d5df43d83d0a6a0ce5dc.zip |
Fix a crashing bug when replacing text in a flow with unicode bodies.
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index f279ce65..8bff0303 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -175,8 +175,13 @@ class u_cleanBin(libpry.AutoTree): assert utils.cleanBin("\nne", True) == ".ne" +class u_safe_subn(libpry.AutoTree): + def test_simple(self): + assert utils.safe_subn("foo", u"bar", "\xc2foo") + tests = [ + u_safe_subn(), u_cleanBin(), u_parse_content_type(), uformat_timestamp(), |