aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/contentviews/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/contentviews/test_base.py')
-rw-r--r--test/mitmproxy/contentviews/test_base.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/mitmproxy/contentviews/test_base.py b/test/mitmproxy/contentviews/test_base.py
index c94d8be2..cd879bfd 100644
--- a/test/mitmproxy/contentviews/test_base.py
+++ b/test/mitmproxy/contentviews/test_base.py
@@ -15,3 +15,18 @@ def test_format_dict():
f_d = base.format_dict(d)
with pytest.raises(StopIteration):
next(f_d)
+
+
+def test_format_pairs():
+ d = [("a", "c"), ("b", "d")]
+ f_d = base.format_pairs(d)
+ assert next(f_d)
+
+ d = [("abc", "")]
+ f_d = base.format_pairs(d)
+ assert next(f_d)
+
+ d = []
+ f_d = base.format_pairs(d)
+ with pytest.raises(StopIteration):
+ next(f_d)