aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-07 14:05:42 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-07 14:05:42 +1200
commit26c8437e884f310ea80ed31209d3c926ced400e5 (patch)
tree92b8aa6c827973217724ec9ed6b885240efb0ebd /test/test_utils.py
parent34ffe46fa0474a47bc737669ccd58fe036e3a033 (diff)
downloadmitmproxy-26c8437e884f310ea80ed31209d3c926ced400e5.tar.gz
mitmproxy-26c8437e884f310ea80ed31209d3c926ced400e5.tar.bz2
mitmproxy-26c8437e884f310ea80ed31209d3c926ced400e5.zip
Better test daemon cleanup, improve utils test coverage.
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 f8c7edb7..eb658e96 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -5,10 +5,17 @@ from libpathod import utils
class uparse_anchor_spec(libpry.AutoTree):
def test_simple(self):
assert utils.parse_anchor_spec("foo=200", {}) == ("foo", "200")
+ libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foobar", {})
libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "*=200", {})
libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foo=bar", {})
+class udata_path(libpry.AutoTree):
+ def test_simple(self):
+ libpry.raises(ValueError, utils.data.path, "nonexistent")
+
+
tests = [
+ udata_path(),
uparse_anchor_spec()
]