aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/tools/console/test_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/tools/console/test_common.py')
-rw-r--r--test/mitmproxy/tools/console/test_common.py16
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)