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/08/30 08:12:22 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #5958: [AIRFLOW-5335] Simplify GCSHook test

mik-laj commented on a change in pull request #5958: [AIRFLOW-5335] Simplify GCSHook test
URL: https://github.com/apache/airflow/pull/5958#discussion_r319402770
 
 

 ##########
 File path: tests/contrib/hooks/test_gcs_hook.py
 ##########
 @@ -71,10 +71,11 @@ def setUp(self):
             self.gcs_hook = gcs_hook.GoogleCloudStorageHook(
                 google_cloud_storage_conn_id='test')
 
-    def test_storage_client_creation(self):
+    @mock.patch(BASE_STRING.format("GoogleCloudBaseHook._get_credentials"))
+    def test_storage_client_creation(self, get_con_mock):
 
 Review comment:
   ```suggestion
       def test_storage_client_creation(self, mock_get_credentials):
   ```
   
   The mock_ * pattern is added to the exclusion list in the pylint. It is never marked as an unused variable. Changing the variable name also makes it easier to understand what is in the variable.

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