diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-16 18:44:34 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-16 18:44:34 +0200 |
commit | 9f26d68f47bc7729b0727ed67253503e047ea0f9 (patch) | |
tree | 50178b4346384ec12e2ae3fd41b508a06d68f1c8 /test/test_pathod.py | |
parent | b889e9e1a2576b0f0aadb4180dd6f4c75db204d6 (diff) | |
download | mitmproxy-9f26d68f47bc7729b0727ed67253503e047ea0f9.tar.gz mitmproxy-9f26d68f47bc7729b0727ed67253503e047ea0f9.tar.bz2 mitmproxy-9f26d68f47bc7729b0727ed67253503e047ea0f9.zip |
adjust to netlib changes
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r-- | test/test_pathod.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index c25de41f..ed37385d 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -4,6 +4,7 @@ import OpenSSL from libpathod import pathod, version from netlib import tcp, http +from netlib.exceptions import HttpException import tutils @@ -180,16 +181,16 @@ class CommonTests(tutils.DaemonTests): def test_invalid_content_length(self): tutils.raises( - http.HttpError, + HttpException, self.pathoc, ["get:/:h'content-length'='foo'"] ) l = self.d.last_log() assert l["type"] == "error" - assert "Content-Length unknown" in l["msg"] + assert "Unparseable Content Length" in l["msg"] def test_invalid_headers(self): - tutils.raises(http.HttpError, self.pathoc, ["get:/:h'\t'='foo'"]) + tutils.raises(HttpException, self.pathoc, ["get:/:h'\t'='foo'"]) l = self.d.last_log() assert l["type"] == "error" assert "Invalid headers" in l["msg"] @@ -247,7 +248,7 @@ class TestDaemon(CommonTests): def test_connect_err(self): tutils.raises( - http.HttpError, + HttpException, self.pathoc, [r"get:'http://foo.com/p/202':da"], connect_to=("localhost", self.d.port) |