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_with_deferrable_mode_execute_failure(
      self, soft_fail, expected_exception
  ):
      """Tests that an AirflowException is raised in case of error event"""
      task = BigQueryTablePartitionExistenceSensor(
          task_id="test_task_id",
          project_id=TEST_PROJECT_ID,
          dataset_id=TEST_DATASET_ID,
          table_id=TEST_TABLE_ID,
          partition_id=TEST_PARTITION_ID,
          deferrable=True,
          soft_fail=soft_fail,
      )
      with pytest.raises(expected_exception):
          task.execute_complete(
              context={},
              event={
                  "status": "error",
                  "message": "test failure message",
              },
          )
  
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning, AirflowSkipException, TaskDeferred
  from airflow.providers.google.cloud.sensors.bigquery import BigQueryTableExistenceAsyncSensor, BigQueryTableExistencePartitionAsyncSensor, BigQueryTableExistenceSensor, BigQueryTablePartitionExistenceSensor
  from airflow.providers.google.cloud.triggers.bigquery import BigQueryTableExistenceTrigger, BigQueryTablePartitionExistenceTrigger
label_desc: Use image node_id 4 for calling the TestBigqueryTablePartitionExistenceSensor obj's underlying member method code with example usage: obj.test_execute_with_deferrable_mode_execute_failure(soft_fail, expected_exception) without return types