aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-01-05 20:08:48 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-01-05 20:08:48 +1300
commita9a4064ff94abdddabc22789a9c32f0cb02c55cb (patch)
tree7de038f1e9aa4efa6737ed8730c56558138af6d0
parentd3b46feb6011c106b42d297b1a4807d187991345 (diff)
downloadmitmproxy-a9a4064ff94abdddabc22789a9c32f0cb02c55cb.tar.gz
mitmproxy-a9a4064ff94abdddabc22789a9c32f0cb02c55cb.tar.bz2
mitmproxy-a9a4064ff94abdddabc22789a9c32f0cb02c55cb.zip
Unit test for ODict.__iter__
-rw-r--r--test/test_odict.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_odict.py b/test/test_odict.py
index f27f6f8b..d59ed67e 100644
--- a/test/test_odict.py
+++ b/test/test_odict.py
@@ -58,6 +58,11 @@ class TestODict:
assert not self.od.in_any("one", "TWO")
assert self.od.in_any("one", "TWO", True)
+ def test_iter(self):
+ assert not [i for i in self.od]
+ self.od.add("foo", 1)
+ assert [i for i in self.od]
+
def test_copy(self):
self.od.add("foo", 1)
self.od.add("foo", 2)