dabla commented on code in PR #61546:
URL: https://github.com/apache/airflow/pull/61546#discussion_r2784148376
##########
providers/google/tests/unit/google/cloud/hooks/test_cloud_run.py:
##########
@@ -293,6 +308,56 @@ async def test_get_operation(self):
operations_pb2.GetOperationRequest(name=OPERATION_NAME),
timeout=120
)
+ @pytest.mark.asyncio
+
@mock.patch("airflow.providers.google.cloud.hooks.cloud_run.JobsAsyncClient")
+ async def test_get_conn_uses_async_client_by_default(self,
mock_async_client):
+ """Test that get_conn uses JobsAsyncClient (grpc_asyncio) when
transport is None or grpc."""
+ hook = CloudRunAsyncHook(transport=None)
+ mock_sync_hook = mock.MagicMock()
Review Comment:
I would spec that MagicMock(spec=CloudRunServiceHook) here with the class of
the sync hook
--
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]