docstr: Asserts that a task is deferred and a BigQueryTablePartitionExistenceTrigger will be fired
  when the BigQueryTablePartitionExistenceSensor is executed and deferrable is set to True.
docstr_tok: ["Asserts","that","a","task","is","deferred","and","a","BigQueryTablePartitionExistenceTrigger","will","be","fired","when","the","BigQueryTablePartitionExistenceSensor","is","executed","and","deferrable","is","set","to","True","."]
code: def test_table_partition_existence_sensor_finish_before_deferred(
      self, mock_defer, mock_hook
  ):
      """
      Asserts that a task is deferred and a BigQueryTablePartitionExistenceTrigger will be fired
      when the BigQueryTablePartitionExistenceSensor is executed and deferrable is set to True.
      """
      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,
      )
      mock_hook.return_value.table_partition_exists.return_value = True
      task.execute(mock.MagicMock())
      assert not mock_defer.called
  
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 2 for calling the TestBigqueryTablePartitionExistenceSensor obj's underlying member method code with example usage: obj.test_table_partition_existence_sensor_finish_before_deferred(mock_defer, mock_hook) without return types