uranusjr commented on code in PR #43902:
URL: https://github.com/apache/airflow/pull/43902#discussion_r1841696302


##########
tests/api_connexion/endpoints/test_task_instance_endpoint.py:
##########
@@ -1748,25 +1735,12 @@ def test_should_assert_call_mocked_api(self, 
mock_set_task_instance_state, sessi
                 {
                     "dag_id": "example_python_operator",
                     "dag_run_id": "TEST_DAG_RUN_ID",
-                    "execution_date": "2020-01-01T00:00:00+00:00",
+                    "logical_date": "2020-01-01T00:00:00+00:00",
                     "task_id": "print_the_context",
                 }
             ]
         }
 
-        mock_set_task_instance_state.assert_called_once_with(
-            commit=False,
-            downstream=True,
-            run_id=None,
-            execution_date=DEFAULT_DATETIME_1,
-            future=True,
-            past=True,
-            state="failed",
-            task_id="print_the_context",
-            upstream=True,
-            session=session,
-        )

Review Comment:
   Should not be removed



##########
tests/api_connexion/endpoints/test_task_instance_endpoint.py:
##########
@@ -2500,56 +2461,6 @@ def test_should_respond_empty_non_scheduled(self, 
session):
         assert response.status_code == 200, response.text
         assert response.json == {"dependencies": []}
 
-    @pytest.mark.parametrize(
-        "state, dependencies",
-        [
-            (
-                State.SCHEDULED,
-                {
-                    "dependencies": [
-                        {
-                            "name": "Execution Date",
-                            "reason": "The execution date is 
2020-01-01T00:00:00+00:00 but this is "
-                            "before the task's start date 
2021-01-01T00:00:00+00:00.",
-                        },
-                        {
-                            "name": "Execution Date",
-                            "reason": "The execution date is 
2020-01-01T00:00:00+00:00 but this is "
-                            "before the task's DAG's start date 
2021-01-01T00:00:00+00:00.",
-                        },
-                    ],
-                },
-            ),
-            (
-                State.NONE,
-                {
-                    "dependencies": [
-                        {
-                            "name": "Execution Date",
-                            "reason": "The execution date is 
2020-01-01T00:00:00+00:00 but this is before the task's start date 
2021-01-01T00:00:00+00:00.",
-                        },
-                        {
-                            "name": "Execution Date",
-                            "reason": "The execution date is 
2020-01-01T00:00:00+00:00 but this is before the task's DAG's start date 
2021-01-01T00:00:00+00:00.",
-                        },
-                        {"name": "Task Instance State", "reason": "Task is in 
the 'None' state."},
-                    ]
-                },
-            ),
-        ],
-    )
-    @provide_session
-    def test_should_respond_dependencies(self, session, state, dependencies):
-        self.create_task_instances(session, task_instances=[{"state": state}], 
update_extras=True)
-
-        response = self.client.get(
-            
"api/v1/dags/example_python_operator/dagRuns/TEST_DAG_RUN_ID/taskInstances/"
-            "print_the_context/dependencies",
-            environ_overrides={"REMOTE_USER": "test"},
-        )
-        assert response.status_code == 200, response.text
-        assert response.json == dependencies

Review Comment:
   Should not be removed



##########
tests/api_connexion/endpoints/test_task_instance_endpoint.py:
##########
@@ -1797,30 +1771,17 @@ def 
test_should_assert_call_mocked_api_when_run_id(self, mock_set_task_instance_
                 {
                     "dag_id": "example_python_operator",
                     "dag_run_id": "TEST_DAG_RUN_ID",
-                    "execution_date": "2020-01-01T00:00:00+00:00",
+                    "logical_date": "2020-01-01T00:00:00+00:00",
                     "task_id": "print_the_context",
                 }
             ]
         }
 
-        mock_set_task_instance_state.assert_called_once_with(
-            commit=False,
-            downstream=True,
-            run_id=run_id,
-            execution_date=None,
-            future=True,
-            past=True,
-            state="failed",
-            task_id="print_the_context",
-            upstream=True,
-            session=session,
-        )

Review Comment:
   Should not be removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to