diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-07 17:12:52 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-07 17:12:52 +1200 |
commit | 1ffc273c9433fc8840b71c79879ae427c93313bd (patch) | |
tree | a656cb3f336a64d37967dbd4c36cad040370d72a /test/mitmproxy/test_utils.py | |
parent | b180bfcf35302cb37f93be60ff954c6d645002b0 (diff) | |
download | mitmproxy-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/mitmproxy/test_utils.py')
-rw-r--r-- | test/mitmproxy/test_utils.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/test/mitmproxy/test_utils.py b/test/mitmproxy/test_utils.py index c01b5f2a..79b72eec 100644 --- a/test/mitmproxy/test_utils.py +++ b/test/mitmproxy/test_utils.py @@ -1,29 +1,14 @@ -import json from mitmproxy import utils from . import tutils utils.CERT_SLEEP_TIME = 0 -def test_format_timestamp(): - assert utils.format_timestamp(utils.timestamp()) - - -def test_format_timestamp_with_milli(): - assert utils.format_timestamp_with_milli(utils.timestamp()) - - def test_pkg_data(): assert utils.pkg_data.path("console") tutils.raises("does not exist", utils.pkg_data.path, "nonexistent") -def test_pretty_json(): - s = json.dumps({"foo": 1}) - assert utils.pretty_json(s) - assert not utils.pretty_json("moo") - - def test_LRUCache(): cache = utils.LRUCache(2) |