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

        a = self._setup_announcement()

        # Signal fired, emails sent.
        eq_(2, len(mail.outbox))
        assert a.content in mail.outbox[0].body
        assert a.content in mail.outbox[1].body

        # No new emails sent when modifying.
        a.creator = self.user
        a.save()
        eq_(2, len(mail.outbox))
Generates a random valid netmask.
dataset/ETHPy150Open mozilla/kitsune/kitsune/announcements/tests/test_tasks.py/AnnouncementSaveTests.test_create_announcement--crossover with--dataset/ETHPy150Open omaciel/fauxfactory/fauxfactory/__init__.py/gen_netmask