diff --git a/tests/app/service/test_sender.py b/tests/app/service/test_sender.py index cb6ee93fd..ca042cc67 100644 --- a/tests/app/service/test_sender.py +++ b/tests/app/service/test_sender.py @@ -106,7 +106,9 @@ def test_send_notification_to_service_users_sends_to_active_users_only( send_notification_to_service_users(service_id=service.id, template_id=template.id) notifications = Notification.query.all() + notifications_recipients = [notification.to for notification in notifications] assert Notification.query.count() == 2 - - assert pending_user.email_address not in [n.to for n in notifications] + assert pending_user.email_address not in notifications_recipients + assert first_active_user.email_address in notifications_recipients + assert second_active_user.email_address in notifications_recipients