docstr: Tests that an AirflowException is raised in case of error event.
docstr_tok: ["Tests","that","an","AirflowException","is","raised","in","case","of","error","event","."]
code: def test_execute_without_external_table_async_should_throw_ex_when_event_status_error(
      self,
  ):
      """
      Tests that an AirflowException is raised in case of error event.
      """
  
      with pytest.raises(AirflowException):
          operator = GCSToBigQueryOperator(
              task_id=TASK_ID,
              bucket=TEST_BUCKET,
              source_objects=TEST_SOURCE_OBJECTS,
              destination_project_dataset_table=TEST_EXPLICIT_DEST,
              write_disposition=WRITE_DISPOSITION,
              schema_fields=SCHEMA_FIELDS,
              external_table=False,
              autodetect=True,
              deferrable=True,
              project_id=JOB_PROJECT_ID,
          )
          operator.execute_complete(
              context=None,
              event={
                  "status": "error",
                  "message": "test failure message",
              },
          )
  
imports: from __future__ import annotations
  import json
  from unittest import mock
  from unittest.mock import MagicMock, call
  import pytest
  from google.cloud.bigquery import DEFAULT_RETRY, Table
  from google.cloud.exceptions import Conflict
  from openlineage.client.facet import ColumnLineageDatasetFacet, ColumnLineageDatasetFacetFieldsAdditional, ColumnLineageDatasetFacetFieldsAdditionalInputFields, DocumentationDatasetFacet, ExternalQueryRunFacet, SchemaDatasetFacet, SchemaField, SymlinksDatasetFacet, SymlinksDatasetFacetIdentifiers
  from openlineage.client.run import Dataset
  from airflow.exceptions import AirflowException, TaskDeferred
  from airflow.models import DAG
  from airflow.models.dagrun import DagRun
  from airflow.models.taskinstance import TaskInstance
  from airflow.providers.google.cloud.transfers.gcs_to_bigquery import GCSToBigQueryOperator
  from airflow.providers.google.cloud.triggers.bigquery import BigQueryInsertJobTrigger
  from airflow.utils.timezone import datetime
  from airflow.utils.types import DagRunType
label_desc: Use image node_id 2 for calling the TestAsyncGCSToBigQueryOperator obj's underlying member method code with example usage: obj.test_execute_without_external_table_async_should_throw_ex_when_event_status_error() without return types