@mock.patch.object(Site.objects, 'get_current')
    def test_create_invisible_announcement(self, get_current):
        get_current.return_value.domain = 'testserver'

        self._setup_announcement(visible_dates=False)
        eq_(0, len(mail.outbox))
No emails sent if announcement is not visible.
dataset/ETHPy150Open mozilla/kitsune/kitsune/announcements/tests/test_tasks.py/AnnouncementSaveTests.test_create_invisible_announcement