diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-06-13 10:32:47 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-06-13 11:02:32 +1200 |
commit | 88832f92a35cacc0d80bffa477d9ffb0e2bee97e (patch) | |
tree | 1e161cd2c35459af818c887d5b2004da0c94a83c /test | |
parent | 56eb0441da1ae85399fdbc5597cf181eeb408223 (diff) | |
download | mitmproxy-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.py | 10 |
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(): |