yjaw commented on code in PR #62744:
URL: https://github.com/apache/airflow/pull/62744#discussion_r2912556031


##########
providers/cloudant/tests/unit/cloudant/hooks/test_cloudant.py:
##########
@@ -32,41 +32,41 @@ class TestCloudantHook:
     def setup_method(self):
         self.cloudant_hook = CloudantHook()
 
-    @patch(
-        
"airflow.providers.cloudant.hooks.cloudant.CloudantHook.get_connection",
-        return_value=Connection(login="the_user", password="the_password", 
host="the_account"),
-    )
     
@patch("airflow.providers.cloudant.hooks.cloudant.CouchDbSessionAuthenticator")
     @patch("airflow.providers.cloudant.hooks.cloudant.CloudantV1")
     def test_get_conn_passes_expected_params_and_returns_cloudant_object(
-        self, mock_cloudant_v1, mock_session_authenticator, mock_get_connection
+        self, mock_cloudant_v1, mock_session_authenticator

Review Comment:
   Defer Connection() instantiation from module-load time to
   test-execution time to avoid triggering SQLAlchemy mapper
   initialization before all models are registered.



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