diff --git a/airflow/cli/commands/dag_command.py b/airflow/cli/commands/dag_command.py index b94d6cf8a22e1..e04bc7381a2f0 100644 --- a/airflow/cli/commands/dag_command.py +++ b/airflow/cli/commands/dag_command.py @@ -406,7 +406,7 @@ def dag_list_dag_runs(args, dag=None): def dag_test(args, session=None): """Execute one single DagRun for a given DAG and execution date, using the DebugExecutor.""" dag = get_dag(subdir=args.subdir, dag_id=args.dag_id) - dag.clear(start_date=args.execution_date, end_date=args.execution_date, dag_run_state=State.NONE) + dag.clear(start_date=args.execution_date, end_date=args.execution_date, dag_run_state=False) try: dag.run( executor=DebugExecutor(), diff --git a/tests/cli/commands/test_dag_command.py b/tests/cli/commands/test_dag_command.py index 0044761bd58f7..a937676c9d57b 100644 --- a/tests/cli/commands/test_dag_command.py +++ b/tests/cli/commands/test_dag_command.py @@ -517,7 +517,7 @@ def test_dag_test(self, mock_get_dag, mock_executor): mock.call().clear( start_date=cli_args.execution_date, end_date=cli_args.execution_date, - dag_run_state=State.NONE, + dag_run_state=False, ), mock.call().run( executor=mock_executor.return_value, @@ -548,7 +548,7 @@ def test_dag_test_show_dag(self, mock_get_dag, mock_executor, mock_render_dag): mock.call().clear( start_date=cli_args.execution_date, end_date=cli_args.execution_date, - dag_run_state=State.NONE, + dag_run_state=False, ), mock.call().run( executor=mock_executor.return_value,