aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-06-13 10:32:47 +1200
committerAldo Cortesi <aldo@corte.si>2017-06-13 11:02:32 +1200
commit88832f92a35cacc0d80bffa477d9ffb0e2bee97e (patch)
tree1e161cd2c35459af818c887d5b2004da0c94a83c /test
parent56eb0441da1ae85399fdbc5597cf181eeb408223 (diff)
downloadmitmproxy-88832f92a35cacc0d80bffa477d9ffb0e2bee97e.tar.gz
mitmproxy-88832f92a35cacc0d80bffa477d9ffb0e2bee97e.tar.bz2
mitmproxy-88832f92a35cacc0d80bffa477d9ffb0e2bee97e.zip
view: show a message if we remove more than one flow from view
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_view.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_view.py b/test/mitmproxy/addons/test_view.py
index d5a3a456..03b2c8dd 100644
--- a/test/mitmproxy/addons/test_view.py
+++ b/test/mitmproxy/addons/test_view.py
@@ -262,6 +262,16 @@ def test_duplicate():
assert v.focus.index == 2
+def test_remove():
+ v = view.View()
+ with taddons.context():
+ f = [tflow.tflow(), tflow.tflow() ]
+ v.add(f)
+ assert len(v) == 2
+ v.remove(f)
+ assert len(v) == 0
+
+
def test_setgetval():
v = view.View()
with taddons.context():