This is an automated email from the ASF dual-hosted git repository.

jason810496 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new adc16e0e963 Fix Azure Data Factory async test on 
azure-mgmt-datafactory 10 (#69798)
adc16e0e963 is described below

commit adc16e0e963fb68c85de5dd495e7b604fc53c083
Author: Jason(Zhe-You) Liu <[email protected]>
AuthorDate: Mon Jul 13 14:50:03 2026 +0900

    Fix Azure Data Factory async test on azure-mgmt-datafactory 10 (#69798)
---
 .../azure/tests/unit/microsoft/azure/hooks/test_data_factory.py    | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py
 
b/providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py
index 11a150c9234..92608f6101a 100644
--- 
a/providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py
+++ 
b/providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_data_factory.py
@@ -679,19 +679,16 @@ class TestAzureDataFactoryAsyncHook:
         assert response == mock_status
 
     @pytest.mark.asyncio
-    @mock.patch("azure.mgmt.datafactory.models._models_py3.PipelineRun")
     @mock.patch(f"{MODULE}.AzureDataFactoryAsyncHook.get_connection")
     @mock.patch(f"{MODULE}.AzureDataFactoryAsyncHook.get_async_conn")
-    async def test_get_pipeline_run_exception_without_resource(
-        self, mock_conn, mock_get_connection, mock_pipeline_run
-    ):
+    async def test_get_pipeline_run_exception_without_resource(self, 
mock_conn, mock_get_connection):
         """
         Test get_pipeline_run function without passing the resource name to 
check the decorator function and
         raise exception
         """
         mock_connection = Connection(extra={"factory_name": DATAFACTORY_NAME})
         mock_get_connection.return_value = mock_connection
-        mock_conn.return_value.pipeline_runs.get.return_value = 
mock_pipeline_run
+        mock_conn.return_value.pipeline_runs.get.return_value = MagicMock()
         hook = AzureDataFactoryAsyncHook(AZURE_DATA_FACTORY_CONN_ID)
         with pytest.raises(AirflowException):
             await hook.get_pipeline_run(RUN_ID, None, DATAFACTORY_NAME)

Reply via email to