DAG("dag", start_date=DEFAULT_DATE, owner_links={"owner1": "my-bad-link"})
    @pytest.mark.parametrize(
        "kwargs",
        [
            {"schedule_interval": "@daily", "schedule": "@weekly"},
            {"timetable": NullTimetable(), "schedule": "@weekly"},
            {"timetable": NullTimetable(), "schedule_interval": "@daily"},
        ],
        ids=[
            "schedule_interval+schedule",
            "timetable+schedule",
            "timetable+schedule_interval",
        ],
    )
    def test_schedule_dag_param(self, kwargs):
        with pytest.raises(ValueError, match="At most one"):
            with DAG(dag_id="hello", **kwargs):
                pass
    def test_continuous_schedule_interval_limits_max_active_runs(self):
        dag = DAG("continuous", start_date=DEFAULT_DATE, schedule_interval="@continuous", max_active_runs=1)
        assert isinstance(dag.timetable, ContinuousTimetable)
        assert dag.max_active_runs == 1
        dag = DAG("continuous", start_date=DEFAULT_DATE, schedule_interval="@continuous", max_active_runs=0)
        assert isinstance(dag.timetable, ContinuousTimetable)
        assert dag.max_active_runs == 0
        with pytest.raises(AirflowException):
            dag = DAG(
                "continuous", start_date=DEFAULT_DATE, schedule_interval="@continuous", max_active_runs=25
            )
class TestDagModel: