aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_protocols_http2.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-20 11:56:38 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-20 11:56:38 +1300
commit8430f857b504a3e7406dc36e54dc32783569d0dd (patch)
treed3116cd540faf01f272a0892fc6a9b83b4f6de8a /test/pathod/test_protocols_http2.py
parent853e03a5e753354fad3a3fa5384ef3a09384ef43 (diff)
downloadmitmproxy-8430f857b504a3e7406dc36e54dc32783569d0dd.tar.gz
mitmproxy-8430f857b504a3e7406dc36e54dc32783569d0dd.tar.bz2
mitmproxy-8430f857b504a3e7406dc36e54dc32783569d0dd.zip
The final piece: netlib -> mitproxy.net
Diffstat (limited to 'test/pathod/test_protocols_http2.py')
-rw-r--r--test/pathod/test_protocols_http2.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/pathod/test_protocols_http2.py b/test/pathod/test_protocols_http2.py
index a7303115..d77702a3 100644
--- a/test/pathod/test_protocols_http2.py
+++ b/test/pathod/test_protocols_http2.py
@@ -2,12 +2,12 @@ import mock
import codecs
import hyperframe
-from netlib import tcp, http
+from mitmproxy.net import tcp, http
from mitmproxy.test.tutils import raises
-from netlib.http import http2
+from mitmproxy.net.http import http2
from mitmproxy import exceptions
-from ..netlib import tservers as netlib_tservers
+from ..mitmproxy.net import tservers as net_tservers
from pathod.protocols.http2 import HTTP2StateProtocol, TCPHandler
@@ -66,7 +66,7 @@ class TestProtocol:
assert mock_server_method.called
-class TestCheckALPNMatch(netlib_tservers.ServerTestBase):
+class TestCheckALPNMatch(net_tservers.ServerTestBase):
handler = EchoHandler
ssl = dict(
alpn_select=b'h2',
@@ -82,7 +82,7 @@ class TestCheckALPNMatch(netlib_tservers.ServerTestBase):
assert protocol.check_alpn()
-class TestCheckALPNMismatch(netlib_tservers.ServerTestBase):
+class TestCheckALPNMismatch(net_tservers.ServerTestBase):
handler = EchoHandler
ssl = dict(
alpn_select=None,
@@ -99,7 +99,7 @@ class TestCheckALPNMismatch(netlib_tservers.ServerTestBase):
protocol.check_alpn()
-class TestPerformServerConnectionPreface(netlib_tservers.ServerTestBase):
+class TestPerformServerConnectionPreface(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
@@ -136,7 +136,7 @@ class TestPerformServerConnectionPreface(netlib_tservers.ServerTestBase):
protocol.perform_server_connection_preface(force=True)
-class TestPerformClientConnectionPreface(netlib_tservers.ServerTestBase):
+class TestPerformClientConnectionPreface(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
@@ -197,7 +197,7 @@ class TestserverstreamIds:
assert self.protocol.current_stream_id == 6
-class TestApplySettings(netlib_tservers.ServerTestBase):
+class TestApplySettings(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
# check settings acknowledgement
@@ -290,7 +290,7 @@ class TestCreateBody:
assert bytes[2] == codecs.decode('0000020001000000013432', 'hex_codec')
-class TestReadRequest(netlib_tservers.ServerTestBase):
+class TestReadRequest(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
@@ -320,7 +320,7 @@ class TestReadRequest(netlib_tservers.ServerTestBase):
assert req.content == b'foobar'
-class TestReadRequestRelative(netlib_tservers.ServerTestBase):
+class TestReadRequestRelative(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
self.wfile.write(
@@ -343,7 +343,7 @@ class TestReadRequestRelative(netlib_tservers.ServerTestBase):
assert req.path == "*"
-class TestReadRequestAbsolute(netlib_tservers.ServerTestBase):
+class TestReadRequestAbsolute(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
self.wfile.write(
@@ -367,7 +367,7 @@ class TestReadRequestAbsolute(netlib_tservers.ServerTestBase):
assert req.port == 22
-class TestReadResponse(netlib_tservers.ServerTestBase):
+class TestReadResponse(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
self.wfile.write(
@@ -396,7 +396,7 @@ class TestReadResponse(netlib_tservers.ServerTestBase):
assert resp.timestamp_end
-class TestReadEmptyResponse(netlib_tservers.ServerTestBase):
+class TestReadEmptyResponse(net_tservers.ServerTestBase):
class handler(tcp.BaseHandler):
def handle(self):
self.wfile.write(