vandonr-amz commented on code in PR #30853:
URL: https://github.com/apache/airflow/pull/30853#discussion_r1189023318


##########
tests/providers/amazon/aws/operators/test_redshift_cluster.py:
##########
@@ -389,9 +392,10 @@ def test_pause_cluster_multiple_attempts_fail(self, 
mock_sleep, mock_conn):
             redshift_operator.execute(None)
         assert mock_conn.pause_cluster.call_count == 10
 
-    def test_pause_cluster_deferrable_mode(self):
+    
@mock.patch("airflow.providers.amazon.aws.hooks.redshift_cluster.RedshiftHook.get_conn")

Review Comment:
   ```suggestion
       @mock.patch.object(RedshiftHook, "get_conn")
   ```
   I feel this syntax is less error-prone, as only the method name needs to be 
an arbitrary string.
   Also, it lets me easily navigate to the hook in my IDE.



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