def test02_notify_ignore_exception(self): service = CardstoriesService({}) d = service.listen() def fail(result): service.raised = True raise CardstoriesException, 'raise exception' d.addCallback(fail) service.notify({'type': 'test'}) self.assertTrue(service.raised)
def test00_notify(self): service = CardstoriesService({}) d = service.listen() def check(result): self.assertTrue(result) service.checked = True return result d.addCallback(check) service.notify({'type': 'test'}) self.assertTrue(service.checked)