diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/__init__.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/builtins/test_filestreamer.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/protocol/test_http1.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/protocol/test_http2.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/protocol/test_websockets.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/test_addons.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/test_controller.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_optmanager.py | 3 | ||||
-rw-r--r-- | test/mitmproxy/test_server.py | 20 | ||||
-rw-r--r-- | test/mitmproxy/tools/bench.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/tools/benchtool.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/tservers.py | 12 | ||||
-rw-r--r-- | test/mitmproxy/tutils.py | 2 | ||||
-rw-r--r-- | test/netlib/http/http1/test_assemble.py | 1 | ||||
-rw-r--r-- | test/netlib/http/http1/test_read.py | 1 | ||||
-rw-r--r-- | test/netlib/http/test_message.py | 1 | ||||
-rw-r--r-- | test/netlib/http/test_request.py | 1 | ||||
-rw-r--r-- | test/netlib/http/test_response.py | 1 | ||||
-rw-r--r-- | test/netlib/test_debug.py | 1 | ||||
-rw-r--r-- | test/netlib/tservers.py | 1 | ||||
-rw-r--r-- | test/pathod/__init__.py | 1 |
21 files changed, 20 insertions, 36 deletions
diff --git a/test/mitmproxy/__init__.py b/test/mitmproxy/__init__.py index 61d03152..fdb35964 100644 --- a/test/mitmproxy/__init__.py +++ b/test/mitmproxy/__init__.py @@ -1,4 +1,3 @@ -from __future__ import (print_function, absolute_import, division) # Silence third-party modules import logging diff --git a/test/mitmproxy/builtins/test_filestreamer.py b/test/mitmproxy/builtins/test_filestreamer.py index 7964c69a..6de2d8e7 100644 --- a/test/mitmproxy/builtins/test_filestreamer.py +++ b/test/mitmproxy/builtins/test_filestreamer.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from .. import tutils, mastertest diff --git a/test/mitmproxy/protocol/test_http1.py b/test/mitmproxy/protocol/test_http1.py index d2c473d7..e6346d72 100644 --- a/test/mitmproxy/protocol/test_http1.py +++ b/test/mitmproxy/protocol/test_http1.py @@ -1,4 +1,3 @@ -from __future__ import (absolute_import, print_function, division) from netlib.http import http1 from netlib.tcp import TCPClient diff --git a/test/mitmproxy/protocol/test_http2.py b/test/mitmproxy/protocol/test_http2.py index 3a222c10..e6b13a05 100644 --- a/test/mitmproxy/protocol/test_http2.py +++ b/test/mitmproxy/protocol/test_http2.py @@ -1,6 +1,5 @@ # coding=utf-8 -from __future__ import (absolute_import, print_function, division) import pytest import os diff --git a/test/mitmproxy/protocol/test_websockets.py b/test/mitmproxy/protocol/test_websockets.py index 094d9298..88145b30 100644 --- a/test/mitmproxy/protocol/test_websockets.py +++ b/test/mitmproxy/protocol/test_websockets.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import pytest import os diff --git a/test/mitmproxy/test_addons.py b/test/mitmproxy/test_addons.py index c5d54e8c..eb35d15b 100644 --- a/test/mitmproxy/test_addons.py +++ b/test/mitmproxy/test_addons.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from mitmproxy import addons from mitmproxy import controller from mitmproxy import options diff --git a/test/mitmproxy/test_controller.py b/test/mitmproxy/test_controller.py index 84f762e6..d4368d07 100644 --- a/test/mitmproxy/test_controller.py +++ b/test/mitmproxy/test_controller.py @@ -24,7 +24,7 @@ class TestMaster: def tick(self, timeout): # Speed up test - super(DummyMaster, self).tick(0) + super().tick(0) m = DummyMaster(None) assert not m.should_exit.is_set() diff --git a/test/mitmproxy/test_optmanager.py b/test/mitmproxy/test_optmanager.py index 8414e6b5..1d677bd3 100644 --- a/test/mitmproxy/test_optmanager.py +++ b/test/mitmproxy/test_optmanager.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import copy from mitmproxy import optmanager @@ -10,7 +9,7 @@ class TO(optmanager.OptManager): def __init__(self, one=None, two=None): self.one = one self.two = two - super(TO, self).__init__() + super().__init__() def test_options(): diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py index ec59fbdf..923d8ccf 100644 --- a/test/mitmproxy/test_server.py +++ b/test/mitmproxy/test_server.py @@ -449,7 +449,7 @@ class TestHTTPSUpstreamServerVerificationWBadCert(tservers.HTTPProxyTest): @classmethod def get_options(cls): - opts = super(tservers.HTTPProxyTest, cls).get_options() + opts = super().get_options() opts.ssl_verify_upstream_trusted_ca = tutils.test_data.path( "data/servercert/trusted-root.pem" ) @@ -540,7 +540,7 @@ class TestHttps2Http(tservers.ReverseProxyTest): @classmethod def get_options(cls): - opts = super(TestHttps2Http, cls).get_options() + opts = super().get_options() s = parse_server_spec(opts.upstream_server) opts.upstream_server = "http://%s" % s.address return opts @@ -700,13 +700,13 @@ class MasterRedirectRequest(tservers.TestMaster): # This is the actual redirection. f.request.port = self.redirect_port - super(MasterRedirectRequest, self).request(f) + super().request(f) @controller.handler def response(self, f): f.response.content = bytes(f.client_conn.address.port) f.response.headers["server-conn-id"] = str(f.server_conn.source_address.port) - super(MasterRedirectRequest, self).response(f) + super().response(f) class TestRedirectRequest(tservers.HTTPProxyTest): @@ -954,19 +954,19 @@ class TestUpstreamProxySSL( delattr(self, "_ignore_%s_backup" % attr) def _ignore_on(self): - super(TestUpstreamProxySSL, self)._ignore_on() + super()._ignore_on() self._host_pattern_on("ignore") def _ignore_off(self): - super(TestUpstreamProxySSL, self)._ignore_off() + super()._ignore_off() self._host_pattern_off("ignore") def _tcpproxy_on(self): - super(TestUpstreamProxySSL, self)._tcpproxy_on() + super()._tcpproxy_on() self._host_pattern_on("tcp") def _tcpproxy_off(self): - super(TestUpstreamProxySSL, self)._tcpproxy_off() + super()._tcpproxy_off() self._host_pattern_off("tcp") def test_simple(self): @@ -1110,7 +1110,7 @@ class TestHTTPSAddUpstreamCertsToClientChainTrue( """ @classmethod def get_options(cls): - opts = super(tservers.HTTPProxyTest, cls).get_options() + opts = super().get_options() opts.add_upstream_certs_to_client_chain = True return opts @@ -1125,6 +1125,6 @@ class TestHTTPSAddUpstreamCertsToClientChainFalse( """ @classmethod def get_options(cls): - opts = super(tservers.HTTPProxyTest, cls).get_options() + opts = super().get_options() opts.add_upstream_certs_to_client_chain = False return opts diff --git a/test/mitmproxy/tools/bench.py b/test/mitmproxy/tools/bench.py index 8127d083..fb75ef46 100644 --- a/test/mitmproxy/tools/bench.py +++ b/test/mitmproxy/tools/bench.py @@ -1,4 +1,3 @@ -from __future__ import print_function import requests import time diff --git a/test/mitmproxy/tools/benchtool.py b/test/mitmproxy/tools/benchtool.py index 17043676..bc68645c 100644 --- a/test/mitmproxy/tools/benchtool.py +++ b/test/mitmproxy/tools/benchtool.py @@ -18,7 +18,7 @@ class ApacheBenchThread(Thread): def __init__(self, concurrency): self.concurrency = concurrency - super(ApacheBenchThread, self).__init__() + super().__init__() def run(self): time.sleep(2) diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py index 6796e243..431e0f90 100644 --- a/test/mitmproxy/tservers.py +++ b/test/mitmproxy/tservers.py @@ -203,7 +203,7 @@ class TransparentProxyTest(ProxyTestBase): @classmethod def setup_class(cls): - super(TransparentProxyTest, cls).setup_class() + super().setup_class() cls._resolver = mock.patch( "mitmproxy.platform.resolver", @@ -214,7 +214,7 @@ class TransparentProxyTest(ProxyTestBase): @classmethod def teardown_class(cls): cls._resolver.stop() - super(TransparentProxyTest, cls).teardown_class() + super().teardown_class() @classmethod def get_options(cls): @@ -308,7 +308,7 @@ class ChainProxyTest(ProxyTestBase): @classmethod def setup_class(cls): cls.chain = [] - super(ChainProxyTest, cls).setup_class() + super().setup_class() for _ in range(cls.n): opts = cls.get_options() config = ProxyConfig(opts) @@ -323,19 +323,19 @@ class ChainProxyTest(ProxyTestBase): @classmethod def teardown_class(cls): - super(ChainProxyTest, cls).teardown_class() + super().teardown_class() for proxy in cls.chain: proxy.shutdown() def setup(self): - super(ChainProxyTest, self).setup() + super().setup() for proxy in self.chain: proxy.tmaster.clear_log() proxy.tmaster.state.clear() @classmethod def get_options(cls): - opts = super(ChainProxyTest, cls).get_options() + opts = super().get_options() if cls.chain: # First proxy is in normal mode. opts.update( mode="upstream", diff --git a/test/mitmproxy/tutils.py b/test/mitmproxy/tutils.py index 575dacf0..2869a5f5 100644 --- a/test/mitmproxy/tutils.py +++ b/test/mitmproxy/tutils.py @@ -52,7 +52,7 @@ class DummyFlow(Flow): """A flow that is neither HTTP nor TCP.""" def __init__(self, client_conn, server_conn, live=None): - super(DummyFlow, self).__init__("dummy", client_conn, server_conn, live) + super().__init__("dummy", client_conn, server_conn, live) def tdummyflow(client_conn=True, server_conn=True, err=None): diff --git a/test/netlib/http/http1/test_assemble.py b/test/netlib/http/http1/test_assemble.py index 841ea58a..5d7e007e 100644 --- a/test/netlib/http/http1/test_assemble.py +++ b/test/netlib/http/http1/test_assemble.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from netlib.exceptions import HttpException from netlib.http import Headers from netlib.http.http1.assemble import ( diff --git a/test/netlib/http/http1/test_read.py b/test/netlib/http/http1/test_read.py index a768a722..86480e2b 100644 --- a/test/netlib/http/http1/test_read.py +++ b/test/netlib/http/http1/test_read.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division from io import BytesIO from mock import Mock diff --git a/test/netlib/http/test_message.py b/test/netlib/http/test_message.py index dd08e018..8374f8f6 100644 --- a/test/netlib/http/test_message.py +++ b/test/netlib/http/test_message.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, print_function, division from netlib.tutils import tresp from netlib import http, tutils diff --git a/test/netlib/http/test_request.py b/test/netlib/http/test_request.py index e091f280..87eb9c35 100644 --- a/test/netlib/http/test_request.py +++ b/test/netlib/http/test_request.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, print_function, division from netlib.http import Headers from netlib.tutils import treq, raises diff --git a/test/netlib/http/test_response.py b/test/netlib/http/test_response.py index 66d6e307..bf08e6f2 100644 --- a/test/netlib/http/test_response.py +++ b/test/netlib/http/test_response.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function, division import email diff --git a/test/netlib/test_debug.py b/test/netlib/test_debug.py index 4732125b..bdb85c9e 100644 --- a/test/netlib/test_debug.py +++ b/test/netlib/test_debug.py @@ -1,4 +1,3 @@ -from __future__ import (absolute_import, print_function, division) import io from netlib import debug diff --git a/test/netlib/tservers.py b/test/netlib/tservers.py index fdf40ff3..e24506ee 100644 --- a/test/netlib/tservers.py +++ b/test/netlib/tservers.py @@ -1,4 +1,3 @@ -from __future__ import (absolute_import, print_function, division) import threading import queue diff --git a/test/pathod/__init__.py b/test/pathod/__init__.py index 3f5dc124..e69de29b 100644 --- a/test/pathod/__init__.py +++ b/test/pathod/__init__.py @@ -1 +0,0 @@ -from __future__ import (print_function, absolute_import, division) |