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


##########
tests/cli/commands/test_task_command.py:
##########
@@ -500,15 +500,14 @@ def test_mapped_task_render_with_template(self, 
dag_maker):
         assert 'echo "2022-01-01"' in output
         assert 'echo "2022-01-08"' in output
 
-    @mock.patch("sqlalchemy.orm.session.Session.query")
+    @mock.patch("airflow.cli.commands.task_command.select")

Review Comment:
   I don’t think you should do this; in practice `select` never raises 
`NoResultsFound` when it is called, only when its result is submitted for 
execution (via `execute`, `scalars`, etc.).



##########
tests/cli/commands/test_task_command.py:
##########
@@ -500,15 +500,14 @@ def test_mapped_task_render_with_template(self, 
dag_maker):
         assert 'echo "2022-01-01"' in output
         assert 'echo "2022-01-08"' in output
 
-    @mock.patch("sqlalchemy.orm.session.Session.query")
+    @mock.patch("airflow.cli.commands.task_command.select")

Review Comment:
   I don’t think you should do this; in practice `select` never raises 
`NoResultsFound` when it is called, only when its result is submitted for 
execution (via `execute`, `scalars`, etc.).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to