@@ -39,7 +39,7 @@ def raise_oserror(*args, **kwargs):
39
39
raise OSError ('fake error' )
40
40
41
41
42
- class FakeSocket ( object ) :
42
+ class FakeSocket :
43
43
def __init__ (self , data = b'' ):
44
44
self ._data = data
45
45
@@ -59,7 +59,7 @@ def makefile(self, mode='r', buffsize=None):
59
59
60
60
class WebSockifyRequestHandlerTestCase (unittest .TestCase ):
61
61
def setUp (self ):
62
- super (WebSockifyRequestHandlerTestCase , self ).setUp ()
62
+ super ().setUp ()
63
63
self .tmpdir = tempfile .mkdtemp ('-websockify-tests' )
64
64
# Mock this out cause it screws tests up
65
65
patch ('os.chdir' ).start ()
@@ -68,7 +68,7 @@ def tearDown(self):
68
68
"""Called automatically after each test."""
69
69
patch .stopall ()
70
70
os .rmdir (self .tmpdir )
71
- super (WebSockifyRequestHandlerTestCase , self ).tearDown ()
71
+ super ().tearDown ()
72
72
73
73
def _get_server (self , handler_class = websockifyserver .WebSockifyRequestHandler ,
74
74
** kwargs ):
@@ -101,7 +101,7 @@ def test_list_dir_with_file_only_returns_error(self, send_error):
101
101
102
102
class WebSockifyServerTestCase (unittest .TestCase ):
103
103
def setUp (self ):
104
- super (WebSockifyServerTestCase , self ).setUp ()
104
+ super ().setUp ()
105
105
self .tmpdir = tempfile .mkdtemp ('-websockify-tests' )
106
106
# Mock this out cause it screws tests up
107
107
patch ('os.chdir' ).start ()
@@ -110,7 +110,7 @@ def tearDown(self):
110
110
"""Called automatically after each test."""
111
111
patch .stopall ()
112
112
os .rmdir (self .tmpdir )
113
- super (WebSockifyServerTestCase , self ).tearDown ()
113
+ super ().tearDown ()
114
114
115
115
def _get_server (self , handler_class = websockifyserver .WebSockifyRequestHandler ,
116
116
** kwargs ):
@@ -181,7 +181,7 @@ def fake_select(rlist, wlist, xlist, timeout=None):
181
181
sock , '127.0.0.1' )
182
182
183
183
def test_do_handshake_no_ssl (self ):
184
- class FakeHandler ( object ) :
184
+ class FakeHandler :
185
185
CALLED = False
186
186
def __init__ (self , * args , ** kwargs ):
187
187
type(self ).CALLED = True
@@ -256,7 +256,7 @@ def wrap_socket(self, *args, **kwargs):
256
256
def test_do_handshake_ssl_sets_ciphers (self ):
257
257
test_ciphers = 'TEST-CIPHERS-1:TEST-CIPHER-2'
258
258
259
- class FakeHandler ( object ) :
259
+ class FakeHandler :
260
260
def __init__ (self , * args , ** kwargs ):
261
261
pass
262
262
@@ -291,7 +291,7 @@ def set_ciphers(self, ciphers_to_set):
291
291
def test_do_handshake_ssl_sets_opions (self ):
292
292
test_options = 0xCAFEBEEF
293
293
294
- class FakeHandler ( object ) :
294
+ class FakeHandler :
295
295
def __init__ (self , * args , ** kwargs ):
296
296
pass
297
297
@@ -302,7 +302,7 @@ def __init__(self, *args, **kwargs):
302
302
def fake_select (rlist , wlist , xlist , timeout = None ):
303
303
return ([sock ], [], [])
304
304
305
- class fake_create_default_context ( object ) :
305
+ class fake_create_default_context :
306
306
OPTIONS = 0
307
307
def __init__ (self , purpose ):
308
308
self .verify_mode = None
0 commit comments