From e73c7fe77e9aa269e32283112e21c0e264c494ab Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 19 Oct 2016 23:11:56 +1300 Subject: mitmproxy.protocol -> mitmproxy.proxy.protocol The protocols here are compltely proxy-specific, are only used from within the proxy module, and are not exposed to users. --- test/mitmproxy/addons/test_clientplayback.py | 2 +- test/mitmproxy/tutils.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py index c5407d18..f15b6290 100644 --- a/test/mitmproxy/addons/test_clientplayback.py +++ b/test/mitmproxy/addons/test_clientplayback.py @@ -14,7 +14,7 @@ class TestClientPlayback: f = tutils.tflow(resp=True) cp.load([f]) assert cp.count() == 1 - RP = "mitmproxy.protocol.http_replay.RequestReplayThread" + RP = "mitmproxy.proxy.protocol.http_replay.RequestReplayThread" with mock.patch(RP) as rp: assert not cp.current with mastertest.mockctx(): diff --git a/test/mitmproxy/tutils.py b/test/mitmproxy/tutils.py index 9724516b..eb0c90e9 100644 --- a/test/mitmproxy/tutils.py +++ b/test/mitmproxy/tutils.py @@ -92,10 +92,10 @@ def tflow(client_conn=True, server_conn=True, req=True, resp=None, err=None): """ @type client_conn: bool | None | mitmproxy.proxy.connection.ClientConnection @type server_conn: bool | None | mitmproxy.proxy.connection.ServerConnection - @type req: bool | None | mitmproxy.protocol.http.HTTPRequest - @type resp: bool | None | mitmproxy.protocol.http.HTTPResponse - @type err: bool | None | mitmproxy.protocol.primitives.Error - @return: mitmproxy.protocol.http.HTTPFlow + @type req: bool | None | mitmproxy.proxy.protocol.http.HTTPRequest + @type resp: bool | None | mitmproxy.proxy.protocol.http.HTTPResponse + @type err: bool | None | mitmproxy.proxy.protocol.primitives.Error + @return: mitmproxy.proxy.protocol.http.HTTPFlow """ if client_conn is True: client_conn = tclient_conn() @@ -160,7 +160,7 @@ def tserver_conn(): def terr(content="error"): """ - @return: mitmproxy.protocol.primitives.Error + @return: mitmproxy.proxy.protocol.primitives.Error """ err = flow.Error(content) return err -- cgit v1.2.3