aboutsummaryrefslogtreecommitdiffstats
path: root/test/netlib
diff options
context:
space:
mode:
authorManish Kumar <mkagenius@gmail.com>2016-08-26 12:52:51 +0530
committerManish Kumar <mkagenius@gmail.com>2016-08-26 12:52:51 +0530
commit16401d5be8fba35599caedb4c78901d4b66ac082 (patch)
treef63b252072105b15f578c86eb6029acd41496d74 /test/netlib
parent51771c01c61259d8cc62ff8cc9715dced9806354 (diff)
downloadmitmproxy-16401d5be8fba35599caedb4c78901d4b66ac082.tar.gz
mitmproxy-16401d5be8fba35599caedb4c78901d4b66ac082.tar.bz2
mitmproxy-16401d5be8fba35599caedb4c78901d4b66ac082.zip
fixed : Divide by zero error came when string was empty, also a test
Diffstat (limited to 'test/netlib')
-rw-r--r--test/netlib/test_strutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/netlib/test_strutils.py b/test/netlib/test_strutils.py
index 52299e59..f8dc3ada 100644
--- a/test/netlib/test_strutils.py
+++ b/test/netlib/test_strutils.py
@@ -85,7 +85,7 @@ def test_escaped_str_to_bytes():
def test_is_mostly_bin():
assert not strutils.is_mostly_bin(b"foo\xFF")
assert strutils.is_mostly_bin(b"foo" + b"\xFF" * 10)
-
+ assert not strutils.is_mostly_bin("")
def test_is_xml():
assert not strutils.is_xml(b"foo")