@override_settings(CELERY_EAGER_PROPAGATES_EXCEPTIONS=True, CELERY_ALWAYS_EAGER=True, BROKER_BACKEND='memory')
    def test_each_action_with_disable_notifications_for_editor(self):
        editor_profile = self.editor.get_profile()
        editor_profile.email_notifications = False
        editor_profile.save()
        # update self.expected_recipients
        self.expected_recipients.remove(editor_profile.user.email)

        for action in self.ACTIONS:
            # with
            expected_subject = self._make_subject(action)
            # when
            result = notifications.issue_board_replica(issue=self.issue, action=action)
            # then
            # no mail sent, since the only recipient: editor, "choose" to not receive emails
            self.assertIsNone(result)
for each action, test notifications are sent, but editor will have disable notifications
dataset/ETHPy150Open scieloorg/scielo-manager/scielomanager/editorialmanager/tests/tests_notifications.py/IssueBoardMessageTests.test_each_action_with_disable_notifications_for_editor