kaxil commented on a change in pull request #5928: [AIRFLOW-5168] Fix Dataproc 
Operators & add tests
URL: https://github.com/apache/airflow/pull/5928#discussion_r318514738
 
 

 ##########
 File path: tests/contrib/operators/test_dataproc_operator.py
 ##########
 @@ -541,18 +592,56 @@ def test_delete_cluster(self):
                 requestId=mock.ANY)
             hook.wait.assert_called_once_with(self.operation)
 
+    def test_render_template(self):
+        task = DataprocClusterDeleteOperator(
+            task_id=TASK_ID,
+            cluster_name=CLUSTER_NAME_TEMPLATED,
+            project_id=GCP_PROJECT_TEMPLATED,
+            region=GCP_REGION_TEMPLATED,
+            dag=self.dag,
+        )
+
+        self.assertEqual(task.template_fields,
+                         ['cluster_name', 'project_id', 'region'])
 
 Review comment:
   `ti.render_template()` should take care of that case. It would fail if it 
doesn't fiend an attribute listed in template_fields

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to