Example #1
0
    def test_email_basket_managers(self, send_mail_mock):
        subject = "[Mozillians - ET] Failed to subscribe or update user bar"
        body = """
    Something terrible happened while trying to subscribe user bar from Basket.

    Here is the error message:

    error
    """
        _email_basket_managers("subscribe", "bar", "error")
        send_mail_mock.assert_called_with(subject, body, "noreply", "basket_managers", fail_silently=False)
Example #2
0
    def test_email_basket_managers(self, send_mail_mock):
        subject = '[Mozillians - ET] Failed to subscribe or update user bar'
        body = """
    Something terrible happened while trying to subscribe user bar from Basket.

    Here is the error message:

    error
    """
        _email_basket_managers('subscribe', 'bar', 'error')
        send_mail_mock.assert_called_with(
            subject, body, 'noreply', 'basket_managers', fail_silently=False)
Example #3
0
    def test_email_basket_managers(self, send_mail_mock):
        subject = '[Mozillians - ET] Failed to subscribe or update user bar'
        body = """
    Something terrible happened while trying to subscribe user bar from Basket.

    Here is the error message:

    error
    """
        _email_basket_managers('subscribe', 'bar', 'error')
        send_mail_mock.assert_called_with(subject,
                                          body,
                                          'noreply',
                                          'basket_managers',
                                          fail_silently=False)
Example #4
0
 def test_email_basket_managers_email_not_set(self, send_mail_mock):
     _email_basket_managers("foo", "bar", "error")
     ok_(not send_mail_mock.called)
Example #5
0
 def test_email_basket_managers_email_not_set(self, send_mail_mock):
     _email_basket_managers('foo', 'bar', 'error')
     ok_(not send_mail_mock.called)
Example #6
0
 def test_email_basket_managers_email_not_set(self, send_mail_mock):
     _email_basket_managers('foo', 'bar', 'error')
     ok_(not send_mail_mock.called)