'If the previous TI specified to wait for the downstream tasks of the
previous dagrun then it should fail this dep if the downstream TIs of
the previous TI are not done.'

def test_failed_wait_for_downstream(self):

    task = self._get_task(depends_on_past=True, start_date=datetime(2016, 1, 1), wait_for_downstream=True)
    prev_ti = Mock(state=State.SUCCESS, are_dependents_done=Mock(return_value=False))
    ti = Mock(task=task, previous_ti=prev_ti, execution_date=datetime(2016, 1, 2))
    dep_context = DepContext(ignore_depends_on_past=False)
    self.assertFalse(PrevDagrunDep().is_met(ti=ti, dep_context=dep_context))
