test_azure_batch_9.py 396 B

1234567
  1. def test_job_configuration_and_create_job(self, mock_batch):
  2. hook = AzureBatchHook(azure_batch_conn_id=self.test_vm_conn_id)
  3. mock_instance = mock_batch.return_value.job.add
  4. job = hook.configure_job(job_id='myjob', pool_id='mypool')
  5. hook.create_job(job)
  6. assert isinstance(job, batch_models.JobAddParameter)
  7. mock_instance.assert_called_once_with(job)