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/netlib | |
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/netlib')
-rw-r--r-- | test/netlib/test_human.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/netlib/test_human.py b/test/netlib/test_human.py index 2a5c2a85..bb97dc54 100644 --- a/test/netlib/test_human.py +++ b/test/netlib/test_human.py @@ -1,6 +1,15 @@ +import time from netlib import human, tutils +def test_format_timestamp(): + assert human.format_timestamp(time.time()) + + +def test_format_timestamp_with_milli(): + assert human.format_timestamp_with_milli(time.time()) + + def test_parse_size(): assert human.parse_size("0") == 0 assert human.parse_size("0b") == 0 |