mitmproxy/test/pathod/test_utils.py
Aldo Cortesi 1ffc273c94 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.
2016-06-07 17:12:52 +12:00

16 lines
262 B
Python

from pathod import utils
import tutils
def test_membool():
m = utils.MemBool()
assert not m.v
assert m(1)
assert m.v == 1
assert m(2)
assert m.v == 2
def test_data_path():
tutils.raises(ValueError, utils.data.path, "nonexistent")