Beispiel #1
0
    def test_send_discussion_email_to_council_edit(self):
        bug = BugFactory.create(bug_id=989812)
        automated_poll = PollFactory.build(
            name='automated_poll', automated_poll=True, bug=bug)

        with patch('remo.voting.models.send_remo_mail') as mocked_send_mail:
            automated_poll_discussion_email(None, automated_poll, False, {})

        ok_(not mocked_send_mail.called)
Beispiel #2
0
    def test_send_discussion_email_to_council_edit(self):
        bug = BugFactory.create(bug_id=989812)
        automated_poll = PollFactory.build(name='automated_poll',
                                           automated_poll=True,
                                           bug=bug)

        with patch('remo.voting.models.send_remo_mail') as mocked_send_mail:
            automated_poll_discussion_email(None, automated_poll, False, {})

        ok_(not mocked_send_mail.called)
Beispiel #3
0
    def test_send_discussion_email_to_council(self):
        bug = BugFactory.create(bug_id=989812)
        automated_poll = PollFactory.build(
            name='automated_poll', automated_poll=True, bug=bug)

        with patch('remo.voting.models.send_remo_mail') as mocked_send_mail:
            automated_poll_discussion_email(None, automated_poll, True, {})

        subject = 'Discuss [Bug 989812] - Bug summary'
        data = {'bug': bug, 'BUGZILLA_URL': BUGZILLA_URL,
                'poll': automated_poll}
        mocked_send_mail.delay.assert_called_once_with(
            subject=subject,
            email_template='emails/review_budget_notify_council.txt',
            recipients_list=[settings.REPS_COUNCIL_ALIAS],
            data=data)
Beispiel #4
0
    def test_send_discussion_email_to_council(self):
        bug = BugFactory.create(bug_id=989812)
        automated_poll = PollFactory.build(name='automated_poll',
                                           automated_poll=True,
                                           bug=bug)

        with patch('remo.voting.models.send_remo_mail') as mocked_send_mail:
            automated_poll_discussion_email(None, automated_poll, True, {})

        subject = 'Discuss [Bug 989812] - Bug summary'
        data = {'bug': bug, 'BUGZILLA_URL': BUGZILLA_URL}
        headers = {'Reply-To': settings.REPS_COUNCIL_ALIAS}
        mocked_send_mail.delay.assert_called_once_with(
            subject=subject,
            email_template='emails/review_budget_notify_council.txt',
            recipients_list=[settings.REPS_COUNCIL_ALIAS],
            data=data,
            headers=headers)
Beispiel #5
0
    def test_send_discussion_email_to_council(self):
        bug = BugFactory.create(bug_id=989812)
        automated_poll = PollFactory.build(name='automated_poll',
                                           automated_poll=True,
                                           bug=bug)

        with patch('remo.voting.models.send_remo_mail') as mocked_send_mail:
            automated_poll_discussion_email(None, automated_poll, True, {})

        subject = 'Discuss [Bug 989812] - Bug summary'
        data = {
            'bug': bug,
            'BUGZILLA_URL': get_bugzilla_url(bug),
            'poll': automated_poll
        }
        mocked_send_mail.delay.assert_called_once_with(
            subject=subject,
            email_template='emails/review_budget_notify_review_team.jinja',
            recipients_list=[settings.REPS_REVIEW_ALIAS],
            data=data)