def test_do_not_catch_exceptions(self): class SpecificError(Exception): pass def boom(sender, **kwargs): # pylint: disable=unused-argument raise SpecificError new_email.connect(boom) msg = self._make_message() try: add_to_list("example-list", msg) except SpecificError: pass else: self.fail("The exception should have been propagated")
def setUp(self): self.mlist = MailingList.objects.create(name="example-list") self.events = [] new_email.connect(self._store_events) new_thread.connect(self._store_events)