aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-20 11:27:05 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-20 11:27:05 +1300
commit01a449b5cb1106a867a6b73cd4877e9b2ec68171 (patch)
tree5a213fb4b8199d525079a55b64d6d232380be341 /test/pathod/test_pathod.py
parent301d52d9d05f2c5f074fe68c73acc1c32e518020 (diff)
downloadmitmproxy-01a449b5cb1106a867a6b73cd4877e9b2ec68171.tar.gz
mitmproxy-01a449b5cb1106a867a6b73cd4877e9b2ec68171.tar.bz2
mitmproxy-01a449b5cb1106a867a6b73cd4877e9b2ec68171.zip
netlib.exceptions.* -> mitmproxy.exceptions
Diffstat (limited to 'test/pathod/test_pathod.py')
-rw-r--r--test/pathod/test_pathod.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py
index 89d7c562..402cd638 100644
--- a/test/pathod/test_pathod.py
+++ b/test/pathod/test_pathod.py
@@ -2,7 +2,7 @@ import io
from pathod import pathod
from netlib import tcp
-from netlib.exceptions import HttpException, TlsException
+from mitmproxy import exceptions
from . import tutils
@@ -157,7 +157,7 @@ class CommonTests(tutils.DaemonTests):
def test_invalid_content_length(self):
tutils.raises(
- HttpException,
+ exceptions.HttpException,
self.pathoc,
["get:/:h'content-length'='foo'"]
)
@@ -166,7 +166,7 @@ class CommonTests(tutils.DaemonTests):
assert "Unparseable Content Length" in l["msg"]
def test_invalid_headers(self):
- tutils.raises(HttpException, self.pathoc, ["get:/:h'\t'='foo'"])
+ tutils.raises(exceptions.HttpException, self.pathoc, ["get:/:h'\t'='foo'"])
l = self.d.last_log()
assert l["type"] == "error"
assert "Invalid headers" in l["msg"]
@@ -225,7 +225,7 @@ class TestDaemon(CommonTests):
def test_connect_err(self):
tutils.raises(
- HttpException,
+ exceptions.HttpException,
self.pathoc,
[r"get:'http://foo.com/p/202':da"],
connect_to=("localhost", self.d.port)
@@ -241,7 +241,7 @@ class TestDaemonSSL(CommonTests):
c.wbufsize = 0
with c.connect():
c.wfile.write(b"\0\0\0\0")
- tutils.raises(TlsException, c.convert_to_ssl)
+ tutils.raises(exceptions.TlsException, c.convert_to_ssl)
l = self.d.last_log()
assert l["type"] == "error"
assert "SSL" in l["msg"]