aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-07 17:12:52 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-07 17:12:52 +1200
commit1ffc273c9433fc8840b71c79879ae427c93313bd (patch)
treea656cb3f336a64d37967dbd4c36cad040370d72a /test/pathod
parentb180bfcf35302cb37f93be60ff954c6d645002b0 (diff)
downloadmitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.tar.gz
mitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.tar.bz2
mitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.zip
Utils cleanups
- Move more stuff that belongs in netlib.human - Move some stuff to near the only use - Zap mitmproxy.utils.timestamp(). I see the rationale, but we used it interchangeably with time.time() throughout the project. Since time.time() dominates in the codebase and timestamp() is such low utility, away it goes.
Diffstat (limited to 'test/pathod')
-rw-r--r--test/pathod/test_pathod_cmdline.py5
-rw-r--r--test/pathod/test_utils.py5
2 files changed, 5 insertions, 5 deletions
diff --git a/test/pathod/test_pathod_cmdline.py b/test/pathod/test_pathod_cmdline.py
index 3c0918ef..18d54c82 100644
--- a/test/pathod/test_pathod_cmdline.py
+++ b/test/pathod/test_pathod_cmdline.py
@@ -3,6 +3,11 @@ import tutils
import mock
+def test_parse_anchor_spec():
+ assert cmdline.parse_anchor_spec("foo=200") == ("foo", "200")
+ assert cmdline.parse_anchor_spec("foo") is None
+
+
@mock.patch("argparse.ArgumentParser.error")
def test_pathod(perror):
assert cmdline.args_pathod(["pathod"])
diff --git a/test/pathod/test_utils.py b/test/pathod/test_utils.py
index a46a523a..2bb82fe7 100644
--- a/test/pathod/test_utils.py
+++ b/test/pathod/test_utils.py
@@ -11,10 +11,5 @@ def test_membool():
assert m.v == 2
-def test_parse_anchor_spec():
- assert utils.parse_anchor_spec("foo=200") == ("foo", "200")
- assert utils.parse_anchor_spec("foo") is None
-
-
def test_data_path():
tutils.raises(ValueError, utils.data.path, "nonexistent")