aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-08-02 16:52:47 +1200
committerAldo Cortesi <aldo@nullcube.com>2011-08-02 16:52:47 +1200
commit1ff6a767d001a8c0f45a190e26be363ea9410534 (patch)
treeca511b918637e306140be6318dab05037ed4beda /test/test_utils.py
parent357502fe03a5f86c1c29d35c5d607541df157640 (diff)
downloadmitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.tar.gz
mitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.tar.bz2
mitmproxy-1ff6a767d001a8c0f45a190e26be363ea9410534.zip
Unit test++
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 06e5fed3..0f543e72 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -29,6 +29,12 @@ class uhexdump(libpry.AutoTree):
def test_simple(self):
assert utils.hexdump("one\0"*10)
+class udel_all(libpry.AutoTree):
+ def test_simple(self):
+ d = dict(a=1, b=2, c=3)
+ utils.del_all(d, ["a", "x", "b"])
+ assert d.keys() == ["c"]
+
class upretty_size(libpry.AutoTree):
def test_simple(self):
@@ -300,6 +306,7 @@ tests = [
upretty_xmlish(),
upretty_json(),
u_urldecode(),
+ udel_all(),
udummy_ca(),
udummy_cert(),
uLRUCache(),