diff options
author | Maximilian Hils <git@maximilianhils.com> | 2020-04-12 01:22:44 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2020-04-12 01:50:34 +0200 |
commit | 8cd5e2d25b6db818518c195af9fcaa62bc46a63a (patch) | |
tree | 0a5051d24804c452a41e0bec3fa99416afee5661 /test/mitmproxy/tools/console/test_common.py | |
parent | d1cb0dbec5dc430d5293719bac11749c79699e24 (diff) | |
download | mitmproxy-8cd5e2d25b6db818518c195af9fcaa62bc46a63a.tar.gz mitmproxy-8cd5e2d25b6db818518c195af9fcaa62bc46a63a.tar.bz2 mitmproxy-8cd5e2d25b6db818518c195af9fcaa62bc46a63a.zip |
lint, mypy, tests++
Diffstat (limited to 'test/mitmproxy/tools/console/test_common.py')
-rw-r--r-- | test/mitmproxy/tools/console/test_common.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/mitmproxy/tools/console/test_common.py b/test/mitmproxy/tools/console/test_common.py index 72438c49..1f59ac4e 100644 --- a/test/mitmproxy/tools/console/test_common.py +++ b/test/mitmproxy/tools/console/test_common.py @@ -5,10 +5,16 @@ from mitmproxy.tools.console import common def test_format_flow(): - f = tflow.tflow(resp=True) - assert common.format_flow(f, True) - assert common.format_flow(f, True, hostheader=True) - assert common.format_flow(f, True, extended=True) + flows = [ + tflow.tflow(resp=True), + tflow.tflow(err=True), + tflow.ttcpflow(), + tflow.ttcpflow(err=True), + ] + for f in flows: + for render_mode in common.RenderMode: + assert common.format_flow(f, render_mode=render_mode) + assert common.format_flow(f, render_mode=render_mode, hostheader=True, focused=False) def test_format_keyvals(): @@ -26,7 +32,7 @@ def test_format_keyvals(): ) ), 1 ) - assert wrapped.render((30, )) + assert wrapped.render((30,)) assert common.format_keyvals( [ ("aa", wrapped) |