def test_get_qualified_dags_should_skip_dags_with_future_start_date(
            self, mock_dag_bag):
        base_dttm = pendulum_datetime(2020, 1, 2)
        test_dag = DAG('test-dag', start_date=pendulum_datetime(3020, 1, 1))
        mock_dag_bag.return_value.dags = {'test-dag': test_dag}

        dags = get_qualified_dags(base_dttm)

        assert dags == []
    def test_get_qualified_dags_should_skip_sub_dags(self, mock_dag_bag):
        base_dttm = pendulum_datetime(2020, 1, 2)
        test_dag = DAG('test-dag')
        test_dag.is_subdag = True
        mock_dag_bag.return_value.dags = {'test-dag': test_dag}

        dags = get_qualified_dags(base_dttm)

        assert dags == []
    def test_get_qualified_dags_should_skip_dags_with_schedule_interval_none(
            self, mock_dag_bag):
        base_dttm = pendulum_datetime(2020, 1, 2)
        test_dag = DAG('test-dag', schedule_interval=None)
        mock_dag_bag.return_value.dags = {'test-dag': test_dag}

        dags = get_qualified_dags(base_dttm)

        assert dags == []
    def test_get_qualified_dags(self, mock_dag_bag):
        test_dag_1 = DAG('test-dag-1',
                         start_date=pendulum_datetime(2020, 1, 1))
        test_dag_2 = DAG('test-dag-2',
                         start_date=pendulum_datetime(2020, 1, 2))
        test_dag_3 = DAG('test-dag-2',
                         start_date=pendulum_datetime(2020, 1, 3))
        mock_dag_bag.return_value.dags = {
            'test-dag-1': test_dag_1,
            'test-dag-2': test_dag_2,
            'test-dag-3': test_dag_3,
        }
        base_dttm = pendulum_datetime(2020, 1, 2)

        dags = get_qualified_dags(base_dttm)

        assert dags == [test_dag_1, test_dag_2]