aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_http.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-11-07 15:59:00 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-11-07 15:59:00 +1300
commit9ce2f473f6febf3738dca77b20ab9a7d3092d3d0 (patch)
treec32840434fe497e8c3e38e452ced2c2202c4d29e /test/test_http.py
parentba468f12b8f59f63ce85b221f0cb2d9e004efe6e (diff)
downloadmitmproxy-9ce2f473f6febf3738dca77b20ab9a7d3092d3d0.tar.gz
mitmproxy-9ce2f473f6febf3738dca77b20ab9a7d3092d3d0.tar.bz2
mitmproxy-9ce2f473f6febf3738dca77b20ab9a7d3092d3d0.zip
Simplify expected_http_body_size signature, fixing a traceback found in fuzzing
Diffstat (limited to 'test/test_http.py')
-rw-r--r--test/test_http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_http.py b/test/test_http.py
index 497e80e2..e3e92a1e 100644
--- a/test/test_http.py
+++ b/test/test_http.py
@@ -119,11 +119,11 @@ def test_expected_http_body_size():
# gibber in the content-length field
h = odict.ODictCaseless()
h["content-length"] = ["foo"]
- tutils.raises(http.HttpError, http.expected_http_body_size, h, False, "GET", 200)
+ assert http.expected_http_body_size(h, False, "GET", 200) is None
# negative number in the content-length field
h = odict.ODictCaseless()
h["content-length"] = ["-7"]
- tutils.raises(http.HttpError, http.expected_http_body_size, h, False, "GET", 200)
+ assert http.expected_http_body_size(h, False, "GET", 200) is None
# explicit length
h = odict.ODictCaseless()
h["content-length"] = ["5"]