1234567 |
- def test_add_single_task_to_job(self, mock_batch):
- hook = AzureBatchHook(azure_batch_conn_id=self.test_vm_conn_id)
- mock_instance = mock_batch.return_value.task.add
- task = hook.configure_task(task_id="mytask", command_line="echo hello")
- hook.add_single_task_to_job(job_id='myjob', task=task)
- assert isinstance(task, batch_models.TaskAddParameter)
- mock_instance.assert_called_once_with(job_id="myjob", task=task)
|