You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/10 11:46:49 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #6530: [AIRFLOW-5878] Use JobID to monitor statuses when running a Dataflow …

feluelle commented on a change in pull request #6530: [AIRFLOW-5878] Use JobID to monitor statuses when running a Dataflow …
URL: https://github.com/apache/airflow/pull/6530#discussion_r344487085
 
 

 ##########
 File path: tests/gcp/hooks/test_dataflow.py
 ##########
 @@ -346,6 +348,15 @@ def test_start_template_dataflow_with_runtime_env(self, mock_conn, mock_dataflow
             gcsPath=TEMPLATE,
             body=body,
         )
+        mock_dataflowjob.assert_called_once_with(
+            dataflow=mock_conn.return_value,
+            job_id=TEST_JOB_ID,
+            location='us-central1',
+            name='test-dataflow-pipeline-{}'.format(MOCK_UUID),
+            num_retries=5,
+            poll_sleep=10,
+            project_number='test'
+        )
 
 Review comment:
   ```suggestion
           )
           mock_uuid.assert_called_once_with()
   ```
   
   I think it is always better to check that the patched object at least has been called instead of pylint-ignoring it. So that if the underlying uuid generation in the class to test changes somehow it will raise an error.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services