@@ -107,76 +107,76 @@ def test_missing_auth(self):
107
107
108
108
@with_instrumented_server (auth = False )
109
109
def test_admin_connect_with_no_auth (self ):
110
- with socketio .SimpleClient () as admin_client :
110
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
111
111
admin_client .connect ('http://localhost:8900' , namespace = '/admin' )
112
- with socketio .SimpleClient () as admin_client :
112
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
113
113
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
114
114
auth = {'foo' : 'bar' })
115
115
116
116
@with_instrumented_server (auth = {'foo' : 'bar' })
117
117
def test_admin_connect_with_dict_auth (self ):
118
- with socketio .SimpleClient () as admin_client :
118
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
119
119
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
120
120
auth = {'foo' : 'bar' })
121
- with socketio .SimpleClient () as admin_client :
121
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
122
122
with pytest .raises (ConnectionError ):
123
123
admin_client .connect (
124
124
'http://localhost:8900' , namespace = '/admin' ,
125
125
auth = {'foo' : 'baz' })
126
- with socketio .SimpleClient () as admin_client :
126
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
127
127
with pytest .raises (ConnectionError ):
128
128
admin_client .connect (
129
129
'http://localhost:8900' , namespace = '/admin' )
130
130
131
131
@with_instrumented_server (auth = [{'foo' : 'bar' },
132
132
{'u' : 'admin' , 'p' : 'secret' }])
133
133
def test_admin_connect_with_list_auth (self ):
134
- with socketio .SimpleClient () as admin_client :
134
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
135
135
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
136
136
auth = {'foo' : 'bar' })
137
- with socketio .SimpleClient () as admin_client :
137
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
138
138
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
139
139
auth = {'u' : 'admin' , 'p' : 'secret' })
140
- with socketio .SimpleClient () as admin_client :
140
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
141
141
with pytest .raises (ConnectionError ):
142
142
admin_client .connect ('http://localhost:8900' ,
143
143
namespace = '/admin' , auth = {'foo' : 'baz' })
144
- with socketio .SimpleClient () as admin_client :
144
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
145
145
with pytest .raises (ConnectionError ):
146
146
admin_client .connect ('http://localhost:8900' ,
147
147
namespace = '/admin' )
148
148
149
149
@with_instrumented_server (auth = _custom_auth )
150
150
def test_admin_connect_with_function_auth (self ):
151
- with socketio .SimpleClient () as admin_client :
151
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
152
152
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
153
153
auth = {'foo' : 'bar' })
154
- with socketio .SimpleClient () as admin_client :
154
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
155
155
with pytest .raises (ConnectionError ):
156
156
admin_client .connect ('http://localhost:8900' ,
157
157
namespace = '/admin' , auth = {'foo' : 'baz' })
158
- with socketio .SimpleClient () as admin_client :
158
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
159
159
with pytest .raises (ConnectionError ):
160
160
admin_client .connect ('http://localhost:8900' ,
161
161
namespace = '/admin' )
162
162
163
163
@with_instrumented_server (auth = _async_custom_auth )
164
164
def test_admin_connect_with_async_function_auth (self ):
165
- with socketio .SimpleClient () as admin_client :
165
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
166
166
admin_client .connect ('http://localhost:8900' , namespace = '/admin' ,
167
167
auth = {'foo' : 'bar' })
168
- with socketio .SimpleClient () as admin_client :
168
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
169
169
with pytest .raises (ConnectionError ):
170
170
admin_client .connect ('http://localhost:8900' ,
171
171
namespace = '/admin' , auth = {'foo' : 'baz' })
172
- with socketio .SimpleClient () as admin_client :
172
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
173
173
with pytest .raises (ConnectionError ):
174
174
admin_client .connect ('http://localhost:8900' ,
175
175
namespace = '/admin' )
176
176
177
177
@with_instrumented_server ()
178
178
def test_admin_connect_only_admin (self ):
179
- with socketio .SimpleClient () as admin_client :
179
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
180
180
admin_client .connect ('http://localhost:8900' , namespace = '/admin' )
181
181
sid = admin_client .sid
182
182
events = self ._expect ({'config' : 1 , 'all_sockets' : 1 ,
@@ -201,10 +201,10 @@ def test_admin_connect_only_admin(self):
201
201
202
202
@with_instrumented_server ()
203
203
def test_admin_connect_with_others (self ):
204
- with socketio .SimpleClient () as client1 , \
205
- socketio .SimpleClient () as client2 , \
206
- socketio .SimpleClient () as client3 , \
207
- socketio .SimpleClient () as admin_client :
204
+ with socketio .SimpleClient (reconnection = False ) as client1 , \
205
+ socketio .SimpleClient (reconnection = False ) as client2 , \
206
+ socketio .SimpleClient (reconnection = False ) as client3 , \
207
+ socketio .SimpleClient (reconnection = False ) as admin_client :
208
208
client1 .connect ('http://localhost:8900' )
209
209
client1 .emit ('enter_room' , 'room' )
210
210
sid1 = client1 .sid
@@ -251,7 +251,7 @@ def test_admin_connect_with_others(self):
251
251
252
252
@with_instrumented_server (mode = 'production' , read_only = True )
253
253
def test_admin_connect_production (self ):
254
- with socketio .SimpleClient () as admin_client :
254
+ with socketio .SimpleClient (reconnection = False ) as admin_client :
255
255
admin_client .connect ('http://localhost:8900' , namespace = '/admin' )
256
256
events = self ._expect ({'config' : 1 , 'server_stats' : 2 },
257
257
admin_client )
@@ -272,9 +272,9 @@ def test_admin_connect_production(self):
272
272
273
273
@with_instrumented_server ()
274
274
def test_admin_features (self ):
275
- with socketio .SimpleClient () as client1 , \
276
- socketio .SimpleClient () as client2 , \
277
- socketio .SimpleClient () as admin_client :
275
+ with socketio .SimpleClient (reconnection = False ) as client1 , \
276
+ socketio .SimpleClient (reconnection = False ) as client2 , \
277
+ socketio .SimpleClient (reconnection = False ) as admin_client :
278
278
client1 .connect ('http://localhost:8900' )
279
279
client2 .connect ('http://localhost:8900' )
280
280
admin_client .connect ('http://localhost:8900' , namespace = '/admin' )
0 commit comments