aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/protocol/test_http1.py2
-rw-r--r--test/mitmproxy/protocol/test_http2.py2
-rw-r--r--test/mitmproxy/protocol/test_websockets.py2
-rw-r--r--test/mitmproxy/test_controller.py10
-rw-r--r--test/mitmproxy/test_flow.py2
-rw-r--r--test/mitmproxy/test_proxy.py2
-rw-r--r--test/mitmproxy/tservers.py2
-rw-r--r--test/netlib/http/http1/test_read.py4
-rw-r--r--test/netlib/http/test_headers.py2
-rw-r--r--test/netlib/http/test_message.py8
-rw-r--r--test/netlib/http/test_request.py6
-rw-r--r--test/netlib/http/test_response.py6
-rw-r--r--test/netlib/test_multidict.py10
-rw-r--r--test/netlib/tservers.py2
-rw-r--r--test/netlib/websockets/test_frame.py4
-rw-r--r--test/netlib/websockets/test_masker.py2
-rw-r--r--test/netlib/websockets/test_utils.py2
-rw-r--r--test/pathod/test_pathod.py2
-rw-r--r--test/pathod/test_protocols_http2.py12
-rw-r--r--test/pathod/tutils.py2
20 files changed, 42 insertions, 42 deletions
diff --git a/test/mitmproxy/protocol/test_http1.py b/test/mitmproxy/protocol/test_http1.py
index 2fc4ac63..3bf1210e 100644
--- a/test/mitmproxy/protocol/test_http1.py
+++ b/test/mitmproxy/protocol/test_http1.py
@@ -6,7 +6,7 @@ from netlib.tutils import treq
from .. import tutils, tservers
-class TestHTTPFlow(object):
+class TestHTTPFlow():
def test_repr(self):
f = tutils.tflow(resp=True, err=True)
diff --git a/test/mitmproxy/protocol/test_http2.py b/test/mitmproxy/protocol/test_http2.py
index c4bd2049..c0f7007d 100644
--- a/test/mitmproxy/protocol/test_http2.py
+++ b/test/mitmproxy/protocol/test_http2.py
@@ -89,7 +89,7 @@ class _Http2ServerBase(netlib_tservers.ServerTestBase):
raise NotImplementedError()
-class _Http2TestBase(object):
+class _Http2TestBase():
@classmethod
def setup_class(cls):
diff --git a/test/mitmproxy/protocol/test_websockets.py b/test/mitmproxy/protocol/test_websockets.py
index e2361d89..f7756f25 100644
--- a/test/mitmproxy/protocol/test_websockets.py
+++ b/test/mitmproxy/protocol/test_websockets.py
@@ -44,7 +44,7 @@ class _WebSocketsServerBase(netlib_tservers.ServerTestBase):
traceback.print_exc()
-class _WebSocketsTestBase(object):
+class _WebSocketsTestBase():
@classmethod
def setup_class(cls):
diff --git a/test/mitmproxy/test_controller.py b/test/mitmproxy/test_controller.py
index 660ce111..bd3dfe4e 100644
--- a/test/mitmproxy/test_controller.py
+++ b/test/mitmproxy/test_controller.py
@@ -15,7 +15,7 @@ class TMsg:
pass
-class TestMaster(object):
+class TestMaster():
def test_simple(self):
class DummyMaster(controller.Master):
@controller.handler
@@ -44,7 +44,7 @@ class TestMaster(object):
m.shutdown()
-class TestServerThread(object):
+class TestServerThread():
def test_simple(self):
m = Mock()
t = controller.ServerThread(m)
@@ -52,7 +52,7 @@ class TestServerThread(object):
assert m.serve_forever.called
-class TestChannel(object):
+class TestChannel():
def test_tell(self):
q = queue.Queue()
channel = controller.Channel(q, Event())
@@ -86,7 +86,7 @@ class TestChannel(object):
channel.ask("test", Mock(name="test_ask_shutdown"))
-class TestReply(object):
+class TestReply():
def test_simple(self):
reply = controller.Reply(42)
assert reply.state == "unhandled"
@@ -179,7 +179,7 @@ class TestReply(object):
reply.commit()
-class TestDummyReply(object):
+class TestDummyReply():
def test_simple(self):
reply = controller.DummyReply()
for _ in range(2):
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index cc9d2691..b4052c62 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -37,7 +37,7 @@ def test_app_registry():
assert ar.get(r)
-class TestHTTPFlow(object):
+class TestHTTPFlow():
def test_copy(self):
f = tutils.tflow(resp=True)
diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py
index f7c64e50..48bb94ca 100644
--- a/test/mitmproxy/test_proxy.py
+++ b/test/mitmproxy/test_proxy.py
@@ -14,7 +14,7 @@ from netlib.http import http1
from . import tutils
-class TestServerConnection(object):
+class TestServerConnection():
def test_simple(self):
self.d = test.Daemon()
diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py
index d3806a99..e597570e 100644
--- a/test/mitmproxy/tservers.py
+++ b/test/mitmproxy/tservers.py
@@ -74,7 +74,7 @@ class ProxyThread(threading.Thread):
self.tmaster.shutdown()
-class ProxyTestBase(object):
+class ProxyTestBase():
# Test Configuration
ssl = None
ssloptions = False
diff --git a/test/netlib/http/http1/test_read.py b/test/netlib/http/http1/test_read.py
index 44eff2ee..fb27857b 100644
--- a/test/netlib/http/http1/test_read.py
+++ b/test/netlib/http/http1/test_read.py
@@ -104,7 +104,7 @@ def test_read_response_head():
assert rfile.read() == b"skip"
-class TestReadBody(object):
+class TestReadBody():
def test_chunked(self):
rfile = BytesIO(b"3\r\nfoo\r\n0\r\n\r\nbar")
body = b"".join(read_body(rfile, None))
@@ -289,7 +289,7 @@ def test_check_http_version():
_check_http_version(b"HTTP/1.b")
-class TestReadHeaders(object):
+class TestReadHeaders():
@staticmethod
def _read(data):
return _read_headers(BytesIO(data))
diff --git a/test/netlib/http/test_headers.py b/test/netlib/http/test_headers.py
index e8752c52..d214ca02 100644
--- a/test/netlib/http/test_headers.py
+++ b/test/netlib/http/test_headers.py
@@ -4,7 +4,7 @@ from netlib.http.headers import Headers, parse_content_type, assemble_content_ty
from netlib.tutils import raises
-class TestHeaders(object):
+class TestHeaders():
def _2host(self):
return Headers(
(
diff --git a/test/netlib/http/test_message.py b/test/netlib/http/test_message.py
index 5d533ad7..9a5b80ed 100644
--- a/test/netlib/http/test_message.py
+++ b/test/netlib/http/test_message.py
@@ -36,7 +36,7 @@ def _test_decoded_attr(message, attr):
assert getattr(message.data, attr) == b"FOO\xBF\x00BAR"
-class TestMessageData(object):
+class TestMessageData():
def test_eq_ne(self):
data = tresp(timestamp_start=42, timestamp_end=42).data
same = tresp(timestamp_start=42, timestamp_end=42).data
@@ -50,7 +50,7 @@ class TestMessageData(object):
assert data != 0
-class TestMessage(object):
+class TestMessage():
def test_init(self):
resp = tresp()
@@ -108,7 +108,7 @@ class TestMessage(object):
assert r.content == b"ggfootoo"
-class TestMessageContentEncoding(object):
+class TestMessageContentEncoding():
def test_simple(self):
r = tresp()
assert r.raw_content == b"message"
@@ -186,7 +186,7 @@ class TestMessageContentEncoding(object):
assert "content-encoding" not in r.headers
-class TestMessageText(object):
+class TestMessageText():
def test_simple(self):
r = tresp(content=b'\xfc')
assert r.raw_content == b"\xfc"
diff --git a/test/netlib/http/test_request.py b/test/netlib/http/test_request.py
index 1f01d29d..bcb1cc43 100644
--- a/test/netlib/http/test_request.py
+++ b/test/netlib/http/test_request.py
@@ -6,7 +6,7 @@ from netlib.tutils import treq, raises
from .test_message import _test_decoded_attr, _test_passthrough_attr
-class TestRequestData(object):
+class TestRequestData():
def test_init(self):
with raises(ValueError):
treq(headers="foobar")
@@ -14,7 +14,7 @@ class TestRequestData(object):
assert isinstance(treq(headers=()).headers, Headers)
-class TestRequestCore(object):
+class TestRequestCore():
"""
Tests for builtins and the attributes that are directly proxied from the data structure
"""
@@ -92,7 +92,7 @@ class TestRequestCore(object):
assert request.headers["Host"] == "example.org"
-class TestRequestUtils(object):
+class TestRequestUtils():
"""
Tests for additional convenience methods.
"""
diff --git a/test/netlib/http/test_response.py b/test/netlib/http/test_response.py
index e97cc419..6ab043c1 100644
--- a/test/netlib/http/test_response.py
+++ b/test/netlib/http/test_response.py
@@ -11,7 +11,7 @@ from netlib.tutils import raises, tresp
from .test_message import _test_passthrough_attr, _test_decoded_attr
-class TestResponseData(object):
+class TestResponseData():
def test_init(self):
with raises(ValueError):
tresp(headers="foobar")
@@ -19,7 +19,7 @@ class TestResponseData(object):
assert isinstance(tresp(headers=()).headers, Headers)
-class TestResponseCore(object):
+class TestResponseCore():
"""
Tests for builtins and the attributes that are directly proxied from the data structure
"""
@@ -60,7 +60,7 @@ class TestResponseCore(object):
_test_decoded_attr(tresp(), "reason")
-class TestResponseUtils(object):
+class TestResponseUtils():
"""
Tests for additional convenience methods.
"""
diff --git a/test/netlib/test_multidict.py b/test/netlib/test_multidict.py
index 58ae0f98..bad5e2b4 100644
--- a/test/netlib/test_multidict.py
+++ b/test/netlib/test_multidict.py
@@ -2,7 +2,7 @@ from netlib import tutils
from netlib.multidict import MultiDict, ImmutableMultiDict, MultiDictView
-class _TMulti(object):
+class _TMulti():
@staticmethod
def _kconv(key):
return key.lower()
@@ -16,7 +16,7 @@ class TImmutableMultiDict(_TMulti, ImmutableMultiDict):
pass
-class TestMultiDict(object):
+class TestMultiDict():
@staticmethod
def _multi():
return TMultiDict((
@@ -194,7 +194,7 @@ class TestMultiDict(object):
assert md == md2
-class TestImmutableMultiDict(object):
+class TestImmutableMultiDict():
def test_modify(self):
md = TImmutableMultiDict()
with tutils.raises(TypeError):
@@ -224,7 +224,7 @@ class TestImmutableMultiDict(object):
assert md.with_insert(0, "foo", "bar").fields == (("foo", "bar"),)
-class TParent(object):
+class TParent():
def __init__(self):
self.vals = tuple()
@@ -235,7 +235,7 @@ class TParent(object):
return self.vals
-class TestMultiDictView(object):
+class TestMultiDictView():
def test_modify(self):
p = TParent()
tv = MultiDictView(p.getter, p.setter)
diff --git a/test/netlib/tservers.py b/test/netlib/tservers.py
index 10a6f70a..d22be413 100644
--- a/test/netlib/tservers.py
+++ b/test/netlib/tservers.py
@@ -85,7 +85,7 @@ class _TServer(tcp.TCPServer):
self.q.put(s.getvalue())
-class ServerTestBase(object):
+class ServerTestBase():
ssl = None
handler = None
addr = ("localhost", 0)
diff --git a/test/netlib/websockets/test_frame.py b/test/netlib/websockets/test_frame.py
index cce39454..265d2513 100644
--- a/test/netlib/websockets/test_frame.py
+++ b/test/netlib/websockets/test_frame.py
@@ -6,7 +6,7 @@ from netlib import websockets
from netlib import tutils
-class TestFrameHeader(object):
+class TestFrameHeader():
@pytest.mark.parametrize("input,expected", [
(0, '0100'),
@@ -123,7 +123,7 @@ class TestFrameHeader(object):
assert f.masking_key
-class TestFrame(object):
+class TestFrame():
def test_equality(self):
f = websockets.Frame(payload=b'1234')
f2 = websockets.Frame(payload=b'1234')
diff --git a/test/netlib/websockets/test_masker.py b/test/netlib/websockets/test_masker.py
index 528fce71..a06fd079 100644
--- a/test/netlib/websockets/test_masker.py
+++ b/test/netlib/websockets/test_masker.py
@@ -4,7 +4,7 @@ import pytest
from netlib import websockets
-class TestMasker(object):
+class TestMasker():
@pytest.mark.parametrize("input,expected", [
([b"a"], '00'),
diff --git a/test/netlib/websockets/test_utils.py b/test/netlib/websockets/test_utils.py
index 34765e04..7e3f02f9 100644
--- a/test/netlib/websockets/test_utils.py
+++ b/test/netlib/websockets/test_utils.py
@@ -4,7 +4,7 @@ from netlib import http
from netlib import websockets
-class TestUtils(object):
+class TestUtils():
def test_client_handshake_headers(self):
h = websockets.client_handshake_headers(version='42')
diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py
index d119348a..69b7a604 100644
--- a/test/pathod/test_pathod.py
+++ b/test/pathod/test_pathod.py
@@ -7,7 +7,7 @@ from netlib.exceptions import HttpException, TlsException
from . import tutils
-class TestPathod(object):
+class TestPathod():
def test_logging(self):
s = io.StringIO()
diff --git a/test/pathod/test_protocols_http2.py b/test/pathod/test_protocols_http2.py
index 7f65c0eb..24353927 100644
--- a/test/pathod/test_protocols_http2.py
+++ b/test/pathod/test_protocols_http2.py
@@ -169,7 +169,7 @@ class TestPerformClientConnectionPreface(netlib_tservers.ServerTestBase):
assert protocol.connection_preface_performed
-class TestClientStreamIds(object):
+class TestClientStreamIds():
c = tcp.TCPClient(("127.0.0.1", 0))
protocol = HTTP2StateProtocol(c)
@@ -183,7 +183,7 @@ class TestClientStreamIds(object):
assert self.protocol.current_stream_id == 5
-class TestserverstreamIds(object):
+class TestserverstreamIds():
c = tcp.TCPClient(("127.0.0.1", 0))
protocol = HTTP2StateProtocol(c, is_server=True)
@@ -230,7 +230,7 @@ class TestApplySettings(netlib_tservers.ServerTestBase):
hyperframe.frame.SettingsFrame.INITIAL_WINDOW_SIZE] == 'deadbeef'
-class TestCreateHeaders(object):
+class TestCreateHeaders():
c = tcp.TCPClient(("127.0.0.1", 0))
def test_create_headers(self):
@@ -267,7 +267,7 @@ class TestCreateHeaders(object):
assert bytes[2] == codecs.decode('00000209040000000163d5', 'hex_codec')
-class TestCreateBody(object):
+class TestCreateBody():
c = tcp.TCPClient(("127.0.0.1", 0))
def test_create_body_empty(self):
@@ -422,7 +422,7 @@ class TestReadEmptyResponse(netlib_tservers.ServerTestBase):
assert resp.content == b''
-class TestAssembleRequest(object):
+class TestAssembleRequest():
c = tcp.TCPClient(("127.0.0.1", 0))
def test_request_simple(self):
@@ -476,7 +476,7 @@ class TestAssembleRequest(object):
codecs.decode('000006000100000001666f6f626172', 'hex_codec')
-class TestAssembleResponse(object):
+class TestAssembleResponse():
c = tcp.TCPClient(("127.0.0.1", 0))
def test_simple(self):
diff --git a/test/pathod/tutils.py b/test/pathod/tutils.py
index 518485ba..6ebf25a8 100644
--- a/test/pathod/tutils.py
+++ b/test/pathod/tutils.py
@@ -23,7 +23,7 @@ def treader(bytes):
return tcp.Reader(fp)
-class DaemonTests(object):
+class DaemonTests():
nohang = False
ssl = False
timeout = None