@@ -211,7 +211,9 @@ def test_send_user_sms_code(client, sample_user, sms_code_template, mocker):
211211 assert notification .reply_to_text == notify_service .get_default_sms_sender ()
212212
213213 app .celery .provider_tasks .deliver_sms .apply_async .assert_called_once_with (
214- ([str (notification .id )]), queue = "notify-internal-tasks"
214+ ([str (notification .id )]),
215+ queue = "notify-internal-tasks" ,
216+ MessageGroupId = str (notification .service_id ),
215217 )
216218
217219
@@ -236,7 +238,9 @@ def test_send_user_code_for_sms_with_optional_to_field(client, sample_user, sms_
236238 notification = Notification .query .first ()
237239 assert notification .to == to_number
238240 app .celery .provider_tasks .deliver_sms .apply_async .assert_called_once_with (
239- ([str (notification .id )]), queue = "notify-internal-tasks"
241+ ([str (notification .id )]),
242+ queue = "notify-internal-tasks" ,
243+ MessageGroupId = str (notification .service_id ),
240244 )
241245
242246
@@ -307,7 +311,11 @@ def test_send_new_user_email_verification(
307311 assert resp .status_code == 204
308312 notification = Notification .query .first ()
309313 assert VerifyCode .query .count () == 0
310- mocked .assert_called_once_with (([str (notification .id )]), queue = "notify-internal-tasks" )
314+ mocked .assert_called_once_with (
315+ ([str (notification .id )]),
316+ queue = "notify-internal-tasks" ,
317+ MessageGroupId = str (notification .service_id ),
318+ )
311319 assert notification .reply_to_text == notify_service .get_default_reply_to_email_address ()
312320 assert notification .personalisation ["name" ] == "Test User"
313321 assert notification .personalisation ["url" ].startswith (expected_url_starts_with .format (hostnames = hostnames ))
@@ -413,7 +421,11 @@ def test_send_user_email_code(
413421 assert str (noti .template_id ) == current_app .config ["EMAIL_2FA_TEMPLATE_ID" ]
414422 assert noti .personalisation ["name" ] == "Test User"
415423 assert noti .personalisation ["url" ].startswith (expected_auth_url .format (hostnames = hostnames ))
416- deliver_email .assert_called_once_with ([str (noti .id )], queue = "notify-internal-tasks" )
424+ deliver_email .assert_called_once_with (
425+ [str (noti .id )],
426+ queue = "notify-internal-tasks" ,
427+ MessageGroupId = str (noti .service_id ),
428+ )
417429
418430
419431def test_send_user_email_code_with_urlencoded_next_param (admin_request , mocker , sample_user , email_2fa_code_template ):
0 commit comments