test_azure_batch_7.py 551 B

12345678910111213
  1. def test_create_pool_with_cloud_config(self, mock_batch):
  2. hook = AzureBatchHook(azure_batch_conn_id=self.test_cloud_conn_id)
  3. mock_instance = mock_batch.return_value.pool.add
  4. pool = hook.configure_pool(
  5. pool_id='mypool',
  6. vm_size="test_vm_size",
  7. target_dedicated_nodes=1,
  8. vm_publisher="test.vm.publisher",
  9. vm_offer="test.vm.offer",
  10. sku_starts_with="test-sku",
  11. )
  12. hook.create_pool(pool=pool)
  13. mock_instance.assert_called_once_with(pool)