@@ -275,7 +275,7 @@ async def get_template_project(
275275 )
276276
277277
278- async def get_group (client , user ):
278+ async def get_group (client : TestClient , user ):
279279 """Creates a group for a given user"""
280280 return await create_user_group (
281281 app = client .app ,
@@ -284,7 +284,7 @@ async def get_group(client, user):
284284 )
285285
286286
287- async def invite_user_to_group (client , owner , invitee , group ):
287+ async def invite_user_to_group (client : TestClient , owner , invitee , group ):
288288 """Invite a user to a group on which the owner has writes over"""
289289 await add_user_in_group (
290290 client .app ,
@@ -304,7 +304,7 @@ async def change_user_role(
304304
305305
306306async def connect_to_socketio (
307- client ,
307+ client : TestClient ,
308308 user ,
309309 socketio_client_factory : Callable [..., Awaitable [socketio .AsyncClient ]],
310310):
@@ -326,11 +326,15 @@ async def connect_to_socketio(
326326 return sio , resource_key
327327
328328
329- async def disconnect_user_from_socketio (client , sio_connection_data ) -> None :
329+ async def disconnect_user_from_socketio (
330+ client : TestClient , sio_connection_data
331+ ) -> None :
330332 """disconnect a previously connected socket.io connection"""
331333 sio , resource_key = sio_connection_data
332334 sid = sio .get_sid ()
333- socket_registry = get_registry (client .server .app )
335+
336+ assert client .app
337+ socket_registry = get_registry (client .app )
334338 await sio .disconnect ()
335339 assert not sio .sid
336340 await asyncio .sleep (0 ) # just to ensure there is a context switch
0 commit comments