def test_propagates_for_parent(self):
    x = self.app.AsyncResult(uuid())
    x.backend = Mock()
    x.parent = EagerResult(uuid(), KeyError('foo'), states.FAILURE)
    with self.assertRaises(KeyError):
        x.get(propagate=True)
    self.assertFalse(x.backend.wait_for.called)
    x.parent = EagerResult(uuid(), 42, states.SUCCESS)
    x.get(propagate=True)
    self.assertTrue(x.backend.wait_for.called)
def test_propagates_for_parent(self):
    x = self.app.AsyncResult(uuid())
    x.backend = Mock()
    x.parent = EagerResult(uuid(), KeyError('foo'), states.FAILURE)
    with self.assertRaises(KeyError):
        x.get(propagate=True)
    self.assertFalse(x.backend.wait_for.called)
    x.parent = EagerResult(uuid(), 42, states.SUCCESS)
    x.get(propagate=True)
    self.assertTrue(x.backend.wait_for.called)