moomindani commented on code in PR #71840:
URL: https://github.com/apache/airflow/pull/71840#discussion_r3887843866


##########
providers/databricks/tests/unit/databricks/hooks/test_databricks_base.py:
##########
@@ -635,10 +637,7 @@ def test_get_token_not_configured_raises(self, mock_conn):
             hook._get_token(raise_error=True)
 
     @pytest.mark.asyncio
-    @mock.patch(
-        
"airflow.providers.databricks.hooks.databricks_base.BaseDatabricksHook.databricks_conn",
-        new_callable=mock.PropertyMock,
-    )
+    
@mock.patch("airflow.providers.databricks.hooks.databricks_base.BaseDatabricksHook.adatabricks_conn")

Review Comment:
   `adatabricks_conn` no longer exists — the hook renamed it to 
`_get_conn_async` — so `mock.patch` fails at setup with `AttributeError: <class 
'...BaseDatabricksHook'> does not have the attribute 'adatabricks_conn'`. This 
target appears nine times in the file (`:640`, `:653`, `:667`, `:688`, `:701`, 
`:717`, `:734`, `:747`, `:757`) and each one errors.
   
   The file also still writes `hook._adatabricks_conn = ...` in 19 places, 
which happens to work because the cache attribute kept its old name. Renaming 
that attribute alongside the method would leave one spelling instead of two.
   



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