You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/22 14:22:14 UTC
[GitHub] [airflow] josh-fell commented on a diff in pull request #25235: Add test_connection to Azure Batch hook
josh-fell commented on code in PR #25235:
URL: https://github.com/apache/airflow/pull/25235#discussion_r927701198
##########
tests/providers/microsoft/azure/hooks/test_azure_batch.py:
##########
@@ -165,3 +166,20 @@ def test_add_single_task_to_job(self, mock_batch):
def test_wait_for_all_task_to_complete(self, mock_batch):
# TODO: Add test
pass
+
+ @mock.patch('airflow.providers.microsoft.azure.hooks.batch.BatchServiceClient')
+ def test_connection_success(self, mock_batch):
+ hook = AzureBatchHook(azure_batch_conn_id=self.test_cloud_conn_id)
+ hook.get_conn().job.return_value = {}
+ status, msg = hook.test_connection()
+ print(status, msg)
Review Comment:
```suggestion
```
Some leftovers from local dev?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org