Lee-W commented on code in PR #39018:
URL: https://github.com/apache/airflow/pull/39018#discussion_r1580693521


##########
tests/providers/google/cloud/operators/test_dataflow.py:
##########
@@ -540,8 +559,9 @@ def test_validation_deferrable_params_raises_error(self):
             DataflowTemplatedJobStartOperator(**init_kwargs)
 
     @pytest.mark.db_test
-    
@mock.patch("airflow.providers.google.cloud.operators.dataflow.DataflowHook.start_template_dataflow")
-    def test_start_with_custom_region(self, dataflow_mock):
+    @mock.patch(f"{DATAFLOW_PATH}.DataflowTemplatedJobStartOperator.xcom_push")
+    @mock.patch(f"{DATAFLOW_PATH}.DataflowHook.start_template_dataflow")
+    def test_start_with_custom_region(self, dataflow_mock, mock_xcom_push):

Review Comment:
   We're mocking xcom_push here. Should we assert it's called or not?



##########
airflow/providers/google/cloud/hooks/dataflow.py:
##########
@@ -736,6 +736,69 @@ def start_template_dataflow(
         jobs_controller.wait_for_done()
         return response["job"]
 
+    @_fallback_to_location_from_variables
+    @_fallback_to_project_id_from_variables
+    @GoogleBaseHook.fallback_to_default_project_id
+    def launch_job_with_template(

Review Comment:
   This is great refactoring!



-- 
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