From 1cffa5f46b84928f1dd211806122d01700345b40 Mon Sep 17 00:00:00 2001 From: dufferzafar Date: Thu, 28 Jul 2016 07:48:10 -0700 Subject: Use replace while decoding --- test/mitmproxy/test_contentview.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/mitmproxy/test_contentview.py b/test/mitmproxy/test_contentview.py index aad53b37..66cad47b 100644 --- a/test/mitmproxy/test_contentview.py +++ b/test/mitmproxy/test_contentview.py @@ -78,6 +78,7 @@ class TestContentView: v = cv.ViewHTMLOutline() s = b"


one

" assert v(s) + assert v(b'\xfe') def test_view_json(self): cv.VIEW_CUTOFF = 100 @@ -106,9 +107,10 @@ class TestContentView: def test_view_javascript(self): v = cv.ViewJavaScript() - assert v("[1, 2, 3]") - assert v("[1, 2, 3") - assert v("function(a){[1, 2, 3]}") + assert v(b"[1, 2, 3]") + assert v(b"[1, 2, 3") + assert v(b"function(a){[1, 2, 3]}") + assert v(b"\xfe") # invalid utf-8 def test_view_css(self): v = cv.ViewCSS() -- cgit v1.2.3