diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-14 23:41:44 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-14 23:47:33 +0100 |
commit | 4d973e82959f5aecab8313b43ce1ab484f21b536 (patch) | |
tree | 63439432d40bd5f0740000b71da0dc6df6053e3c | |
parent | a12c3d3f8ea255dd03bb7e993fa85eb00f47ab29 (diff) | |
download | mitmproxy-4d973e82959f5aecab8313b43ce1ab484f21b536.tar.gz mitmproxy-4d973e82959f5aecab8313b43ce1ab484f21b536.tar.bz2 mitmproxy-4d973e82959f5aecab8313b43ce1ab484f21b536.zip |
fix imports
21 files changed, 26 insertions, 26 deletions
diff --git a/test/mitmproxy/contentviews/image/__init__.py b/test/mitmproxy/contentviews/image/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/contentviews/image/__init__.py diff --git a/test/mitmproxy/contentviews/image/test_view.py b/test/mitmproxy/contentviews/image/test_view.py index e3dfb714..ee2f9eaa 100644 --- a/test/mitmproxy/contentviews/image/test_view.py +++ b/test/mitmproxy/contentviews/image/test_view.py @@ -1,6 +1,6 @@ from mitmproxy.contentviews import image from mitmproxy.test import tutils -from . import full_eval +from .. import full_eval def test_view_image(): diff --git a/test/mitmproxy/proxy/__init__.py b/test/mitmproxy/proxy/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/proxy/__init__.py diff --git a/test/mitmproxy/proxy/protocol/__init__.py b/test/mitmproxy/proxy/protocol/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/proxy/protocol/__init__.py diff --git a/test/mitmproxy/proxy/protocol/test_http1.py b/test/mitmproxy/proxy/protocol/test_http1.py index 44a9effa..07cd7dcc 100644 --- a/test/mitmproxy/proxy/protocol/test_http1.py +++ b/test/mitmproxy/proxy/protocol/test_http1.py @@ -2,7 +2,7 @@ from mitmproxy.test import tflow from mitmproxy.net.http import http1 from mitmproxy.net.tcp import TCPClient from mitmproxy.test.tutils import treq -from .. import tservers +from ... import tservers class TestHTTPFlow: diff --git a/test/mitmproxy/proxy/protocol/test_http2.py b/test/mitmproxy/proxy/protocol/test_http2.py index 8e8ba644..f5d9259d 100644 --- a/test/mitmproxy/proxy/protocol/test_http2.py +++ b/test/mitmproxy/proxy/protocol/test_http2.py @@ -11,12 +11,12 @@ from mitmproxy import options from mitmproxy.proxy.config import ProxyConfig import mitmproxy.net -from ...mitmproxy.net import tservers as net_tservers +from ....mitmproxy.net import tservers as net_tservers from mitmproxy import exceptions from mitmproxy.net.http import http1, http2 -from .. import tservers -from ...conftest import requires_alpn +from ... import tservers +from ....conftest import requires_alpn import logging logging.getLogger("hyper.packages.hpack.hpack").setLevel(logging.WARNING) diff --git a/test/mitmproxy/proxy/protocol/test_websocket.py b/test/mitmproxy/proxy/protocol/test_websocket.py index 73ee8b35..4ea01d34 100644 --- a/test/mitmproxy/proxy/protocol/test_websocket.py +++ b/test/mitmproxy/proxy/protocol/test_websocket.py @@ -9,17 +9,17 @@ from mitmproxy.http import HTTPFlow from mitmproxy.websocket import WebSocketFlow from mitmproxy.proxy.config import ProxyConfig -import mitmproxy.net +from mitmproxy.net import tcp from mitmproxy.net import http -from ...mitmproxy.net import tservers as net_tservers -from .. import tservers +from ....mitmproxy.net import tservers as net_tservers +from ... import tservers from mitmproxy.net import websockets class _WebSocketServerBase(net_tservers.ServerTestBase): - class handler(mitmproxy.net.tcp.BaseHandler): + class handler(tcp.BaseHandler): def handle(self): try: @@ -80,7 +80,7 @@ class _WebSocketTestBase: self.server.server.handle_websockets = self.handle_websockets def _setup_connection(self): - client = mitmproxy.net.tcp.TCPClient(("127.0.0.1", self.proxy.port)) + client = tcp.TCPClient(("127.0.0.1", self.proxy.port)) client.connect() request = http.Request( diff --git a/test/mitmproxy/proxy/test_server.py b/test/mitmproxy/proxy/test_server.py index 9cd47cea..0be772a4 100644 --- a/test/mitmproxy/proxy/test_server.py +++ b/test/mitmproxy/proxy/test_server.py @@ -21,8 +21,8 @@ from mitmproxy.net.tcp import Address from pathod import pathoc from pathod import pathod -from . import tservers -from ..conftest import skip_appveyor +from .. import tservers +from ...conftest import skip_appveyor """ diff --git a/test/mitmproxy/tools/__init__.py b/test/mitmproxy/tools/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/tools/__init__.py diff --git a/test/mitmproxy/tools/console/test_common.py b/test/mitmproxy/tools/console/test_common.py index 236ebb41..3ab4fd67 100644 --- a/test/mitmproxy/tools/console/test_common.py +++ b/test/mitmproxy/tools/console/test_common.py @@ -1,7 +1,7 @@ from mitmproxy.test import tflow from mitmproxy.tools.console import common -from ...conftest import skip_appveyor +from ....conftest import skip_appveyor @skip_appveyor diff --git a/test/mitmproxy/tools/console/test_help.py b/test/mitmproxy/tools/console/test_help.py index 86b842d8..ac3011e6 100644 --- a/test/mitmproxy/tools/console/test_help.py +++ b/test/mitmproxy/tools/console/test_help.py @@ -1,6 +1,6 @@ import mitmproxy.tools.console.help as help -from ...conftest import skip_appveyor +from ....conftest import skip_appveyor @skip_appveyor diff --git a/test/mitmproxy/tools/console/test_master.py b/test/mitmproxy/tools/console/test_master.py index 1c89467c..0bf3734b 100644 --- a/test/mitmproxy/tools/console/test_master.py +++ b/test/mitmproxy/tools/console/test_master.py @@ -1,10 +1,10 @@ from mitmproxy.test import tflow -import mitmproxy.test.tutils +from mitmproxy.test import tutils from mitmproxy.tools import console from mitmproxy import proxy from mitmproxy import options from mitmproxy.tools.console import common -from .. import tservers +from ... import tservers def test_format_keyvals(): @@ -45,12 +45,12 @@ class TestMaster(tservers.MasterTest): def test_intercept(self): """regression test for https://github.com/mitmproxy/mitmproxy/issues/1605""" m = self.mkmaster(intercept="~b bar") - f = tflow.tflow(req=mitmproxy.test.tutils.treq(content=b"foo")) + f = tflow.tflow(req=tutils.treq(content=b"foo")) m.request(f) assert not m.view[0].intercepted - f = tflow.tflow(req=mitmproxy.test.tutils.treq(content=b"bar")) + f = tflow.tflow(req=tutils.treq(content=b"bar")) m.request(f) assert m.view[1].intercepted - f = tflow.tflow(resp=mitmproxy.test.tutils.tresp(content=b"bar")) + f = tflow.tflow(resp=tutils.tresp(content=b"bar")) m.request(f) assert m.view[2].intercepted diff --git a/test/mitmproxy/tools/console/test_palettes.py b/test/mitmproxy/tools/console/test_palettes.py index 3892797d..1c7e1df1 100644 --- a/test/mitmproxy/tools/console/test_palettes.py +++ b/test/mitmproxy/tools/console/test_palettes.py @@ -1,6 +1,6 @@ import mitmproxy.tools.console.palettes as palettes -from ...conftest import skip_appveyor +from ....conftest import skip_appveyor @skip_appveyor diff --git a/test/mitmproxy/tools/test_dump.py b/test/mitmproxy/tools/test_dump.py index f8a88871..b4183725 100644 --- a/test/mitmproxy/tools/test_dump.py +++ b/test/mitmproxy/tools/test_dump.py @@ -8,7 +8,7 @@ from mitmproxy import controller from mitmproxy.tools import dump from mitmproxy.test import tutils -from . import tservers +from .. import tservers class TestDumpMaster(tservers.MasterTest): diff --git a/test/mitmproxy/tools/web/__init__.py b/test/mitmproxy/tools/web/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/mitmproxy/tools/web/__init__.py diff --git a/test/mitmproxy/tools/web/test_master.py b/test/mitmproxy/tools/web/test_master.py index d4190ffb..27f99a18 100644 --- a/test/mitmproxy/tools/web/test_master.py +++ b/test/mitmproxy/tools/web/test_master.py @@ -3,7 +3,7 @@ from mitmproxy import proxy from mitmproxy import options from mitmproxy.proxy.config import ProxyConfig -from . import tservers +from ... import tservers class TestWebMaster(tservers.MasterTest): diff --git a/test/pathod/language/__init__.py b/test/pathod/language/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/pathod/language/__init__.py diff --git a/test/pathod/language/test_http.py b/test/pathod/language/test_http.py index 6ab43fe0..a5b35c05 100644 --- a/test/pathod/language/test_http.py +++ b/test/pathod/language/test_http.py @@ -4,7 +4,7 @@ import pytest from pathod import language from pathod.language import http, base -from . import tservers +from .. import tservers def parse_request(s): diff --git a/test/pathod/language/test_websockets.py b/test/pathod/language/test_websockets.py index e5046591..ed766bca 100644 --- a/test/pathod/language/test_websockets.py +++ b/test/pathod/language/test_websockets.py @@ -4,7 +4,7 @@ from pathod import language from pathod.language import websockets import mitmproxy.net.websockets -from . import tservers +from .. import tservers def parse_request(s): diff --git a/test/pathod/protocols/__init__.py b/test/pathod/protocols/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/pathod/protocols/__init__.py diff --git a/test/pathod/protocols/test_http2.py b/test/pathod/protocols/test_http2.py index 5bb31031..1c074197 100644 --- a/test/pathod/protocols/test_http2.py +++ b/test/pathod/protocols/test_http2.py @@ -7,11 +7,11 @@ from mitmproxy.net import tcp, http from mitmproxy.net.http import http2 from mitmproxy import exceptions -from ..mitmproxy.net import tservers as net_tservers +from ...mitmproxy.net import tservers as net_tservers from pathod.protocols.http2 import HTTP2StateProtocol, TCPHandler -from ..conftest import requires_alpn +from ...conftest import requires_alpn class TestTCPHandlerWrapper: |