

@mock.patch.object(Site.objects, 'get_current')
def test_send_nonexistent(self, get_current):
    "Send a non-existent announcement by email shouldn't break."
    get_current.return_value.domain = 'testserver'
    send_group_email(1)
    eq_(0, len(mail.outbox))

dataset/ETHPy150Open mozilla/kitsune/kitsune/announcements/tests/test_tasks.py AnnouncementSaveTests.test_send_nonexistent/original