aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-08-18 18:14:13 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-08-18 18:14:13 +1200
commit877a3e206263edbd8a973689b08f8c004de0225f (patch)
tree90c7c3d641351bdbd100f417d543d3b0ff60e93a /test
parent1c21a28e6423edf3b903191610b45345720e0458 (diff)
downloadmitmproxy-877a3e206263edbd8a973689b08f8c004de0225f.tar.gz
mitmproxy-877a3e206263edbd8a973689b08f8c004de0225f.tar.bz2
mitmproxy-877a3e206263edbd8a973689b08f8c004de0225f.zip
Add a get_first convenience function to ODict.
Diffstat (limited to 'test')
-rw-r--r--test/test_odict.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_odict.py b/test/test_odict.py
index e7453e2d..f27f6f8b 100644
--- a/test/test_odict.py
+++ b/test/test_odict.py
@@ -85,6 +85,12 @@ class TestODict:
assert self.od.get("one") == ["two"]
assert self.od.get("two") == None
+ def test_get_first(self):
+ self.od.add("one", "two")
+ self.od.add("one", "three")
+ assert self.od.get_first("one") == "two"
+ assert self.od.get_first("two") == None
+
class TestODictCaseless:
def setUp(self):