@@ -183,7 +183,11 @@ def test_permissions_work_with_many_users(
183183 perm = random .choice (list (users .keys ()))
184184 user = AuthUserFactory ()
185185
186- project_private .add_contributor (user , permissions = perm )
186+ project_private .add_contributor (
187+ user ,
188+ permissions = perm ,
189+ notification_type = False
190+ )
187191 users [perm ].append (user ._id )
188192
189193 res = app .get (url_private , auth = user .auth )
@@ -242,8 +246,8 @@ def test_add_contributor_sends_email(self, app, user, user_two, url_project_cont
242246 auth = user .auth
243247 )
244248 assert res .status_code == 201
245- assert len (notifications ) == 1
246- assert notifications [0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
249+ assert len (notifications [ 'emits' ] ) == 1
250+ assert notifications ['emits' ][ 0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
247251
248252 # Overrides TestNodeContributorCreateEmail
249253 def test_add_contributor_signal_if_default (
@@ -285,8 +289,8 @@ def test_add_unregistered_contributor_sends_email(self, app, user, url_project_c
285289 auth = user .auth
286290 )
287291 assert res .status_code == 201
288- assert len (notifications ) == 1
289- assert notifications [0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
292+ assert len (notifications [ 'emits' ] ) == 1
293+ assert notifications ['emits' ][ 0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
290294
291295 # Overrides TestNodeContributorCreateEmail
292296 def test_add_unregistered_contributor_signal_if_default (self , app , user , url_project_contribs ):
@@ -304,8 +308,8 @@ def test_add_unregistered_contributor_signal_if_default(self, app, user, url_pro
304308 }, auth = user .auth
305309 )
306310 assert res .status_code == 201
307- assert len (notifications ) == 1
308- assert notifications [0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
311+ assert len (notifications [ 'emits' ] ) == 1
312+ assert notifications ['emits' ][ 0 ]['type' ] == NotificationType .Type .DRAFT_REGISTRATION_CONTRIBUTOR_ADDED_DEFAULT
309313
310314 # Overrides TestNodeContributorCreateEmail
311315 def test_add_unregistered_contributor_without_email_no_email (self , app , user , url_project_contribs ):
@@ -374,11 +378,17 @@ def project_private(
374378 project_private .add_contributor (
375379 user_two ,
376380 permissions = permissions .READ ,
377- visible = True , save = True )
381+ visible = True ,
382+ save = True ,
383+ notification_type = False
384+ )
378385 project_private .add_contributor (
379386 user_three ,
380387 permissions = permissions .READ ,
381- visible = True , save = True )
388+ visible = True ,
389+ save = True ,
390+ notification_type = False
391+ )
382392 return project_private
383393
384394 @pytest .fixture ()
@@ -484,11 +494,17 @@ def project_private(
484494 project_private .add_contributor (
485495 user_two ,
486496 permissions = permissions .READ ,
487- visible = True , save = True )
497+ visible = True ,
498+ save = True ,
499+ notification_type = False
500+ )
488501 project_private .add_contributor (
489502 user_three ,
490503 permissions = permissions .READ ,
491- visible = True , save = True )
504+ visible = True ,
505+ save = True ,
506+ notification_type = False
507+ )
492508 return project_private
493509
494510
0 commit comments