From 9ce2f473f6febf3738dca77b20ab9a7d3092d3d0 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 7 Nov 2014 15:59:00 +1300 Subject: Simplify expected_http_body_size signature, fixing a traceback found in fuzzing --- test/test_http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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"] -- cgit v1.2.3