mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-22 23:53:03 +08:00
Move human-friendly format functions to netlib.human, remove redundant implementations
This commit is contained in:
@@ -13,13 +13,6 @@ def test_membool():
|
||||
assert m.v == 2
|
||||
|
||||
|
||||
def test_parse_size():
|
||||
assert utils.parse_size("100") == 100
|
||||
assert utils.parse_size("100k") == 100 * 1024
|
||||
tutils.raises("invalid size spec", utils.parse_size, "foo")
|
||||
tutils.raises("invalid size spec", utils.parse_size, "100kk")
|
||||
|
||||
|
||||
def test_parse_anchor_spec():
|
||||
assert utils.parse_anchor_spec("foo=200") == ("foo", "200")
|
||||
assert utils.parse_anchor_spec("foo") is None
|
||||
|
||||
Reference in New Issue
Block a user