12345678910111213 |
- def test_create_pool_with_vm_config(self, mock_batch):
- hook = AzureBatchHook(azure_batch_conn_id=self.test_vm_conn_id)
- mock_instance = mock_batch.return_value.pool.add
- pool = hook.configure_pool(
- pool_id='mypool',
- vm_size="test_vm_size",
- target_dedicated_nodes=1,
- vm_publisher="test.vm.publisher",
- vm_offer="test.vm.offer",
- sku_starts_with="test-sku",
- )
- hook.create_pool(pool=pool)
- mock_instance.assert_called_once_with(pool)
|