docstr: Test that an AirflowException is raised if job_id is not set before deferral.
docstr_tok: ["Test","that","an","AirflowException","is","raised","if","job_id","is","not","set","before","deferral","."]
code: def test_defer_but_failed_due_to_job_id_not_found(self, mock_client):
      """Test that an AirflowException is raised if job_id is not set before deferral."""
      mock_client.return_value.submit_job.return_value = {
          "jobName": JOB_NAME,
          "jobId": None,
      }
  
      batch = BatchOperator(
          task_id="task",
          job_name=JOB_NAME,
          job_queue="queue",
          job_definition="hello-world",
          do_xcom_push=False,
          deferrable=True,
      )
      with pytest.raises(AirflowException) as exc:
          batch.execute(self.mock_context)
      assert "AWS Batch job - job_id was not found" in str(exc.value)
  
imports: from __future__ import annotations
  from unittest import mock
  from unittest.mock import patch
  import pytest
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning, TaskDeferred
  from airflow.providers.amazon.aws.hooks.batch_client import BatchClientHook
  from airflow.providers.amazon.aws.operators.batch import BatchCreateComputeEnvironmentOperator, BatchOperator
  from airflow.providers.amazon.aws.triggers.batch import BatchCreateComputeEnvironmentTrigger, BatchJobTrigger
label_desc: Use image node_id 13 for calling the TestBatchOperator obj's underlying member method code with example usage: obj.test_defer_but_failed_due_to_job_id_not_found(mock_client) without return types