diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2012-03-25 10:56:45 +1300 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2012-03-25 10:56:45 +1300 |
| commit | 2240d2a6a52a4fab966abf31fe03d66de726cf94 (patch) | |
| tree | ac59fc38dcd3eb95e76e69c8ef072ccff3cd4118 /test | |
| parent | 74c51df5806e98046a1abea72c377781434810d8 (diff) | |
| download | mitmproxy-2240d2a6a52a4fab966abf31fe03d66de726cf94.tar.gz mitmproxy-2240d2a6a52a4fab966abf31fe03d66de726cf94.tar.bz2 mitmproxy-2240d2a6a52a4fab966abf31fe03d66de726cf94.zip | |
Pretty view now indents Javascript.
Thanks to the JSBeautifier project, which is now included in the contrib directory.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_console_contentview.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_console_contentview.py b/test/test_console_contentview.py index cbb19678..e7258545 100644 --- a/test/test_console_contentview.py +++ b/test/test_console_contentview.py @@ -9,7 +9,7 @@ class uContentView(libpry.AutoTree): assert not txt cv.trailer(cv.VIEW_CUTOFF + 10, txt) assert txt - + def test_get_view_func(self): f = cv.get_view_func( cv.VIEW_CONTENT_HEX, @@ -75,6 +75,11 @@ class uContentView(libpry.AutoTree): def test_view_raw(self): assert cv.view_raw([], "foo") + def test_view_javascript(self): + assert cv.view_javascript([], "[1, 2, 3]") + assert cv.view_javascript([], "[1, 2, 3") + assert cv.view_javascript([], "function(a){[1, 2, 3]}") + def test_view_raw(self): assert cv.view_hex([], "foo") |
