diff options
author | Maximilian Hils <git@maximilianhils.com> | 2020-04-18 19:46:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 19:46:11 +0200 |
commit | 2774928319b706d8b6f85919f8811776342986c9 (patch) | |
tree | 5abef13928c30918d143db480190c2bfb5df1e9c /test/mitmproxy/tools/console/test_common.py | |
parent | 408c9a6ff37a90c90cff381cce748e03c45f085d (diff) | |
parent | 8cd5e2d25b6db818518c195af9fcaa62bc46a63a (diff) | |
download | mitmproxy-2774928319b706d8b6f85919f8811776342986c9.tar.gz mitmproxy-2774928319b706d8b6f85919f8811776342986c9.tar.bz2 mitmproxy-2774928319b706d8b6f85919f8811776342986c9.zip |
Merge pull request #3927 from mhils/tcp-ui
add tcp flow ui
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) |