docstr: Test that if the Response Body contains an error message, an AirflowException is raised
docstr_tok: ["Test","that","if","the","Response","Body","contains","an","error","message",",","an","AirflowException","is","raised"]
code: def test_response_invalid(self):
      """
      Test that if the Response Body contains an error message, an AirflowException is raised
      """
      init_kwargs = {
          "task_id": "test_create_datapipeline",
          "body": {"error": "Testing that AirflowException is raised"},
          "project_id": TEST_PROJECTID,
          "location": TEST_LOCATION,
          "gcp_conn_id": TEST_GCP_CONN_ID,
      }
      with pytest.raises(AirflowException):
          CreateDataPipelineOperator(**init_kwargs).execute(
              mock.MagicMock()
          )
  
file_path: airflow/tests/providers/google/cloud/operators/test_datapipeline.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.providers.google.cloud.operators.datapipeline import CreateDataPipelineOperator, RunDataPipelineOperator
label_desc: Use image node_id 6 for calling the TestCreateDataPipelineOperator obj's underlying member method code with example usage: obj.test_response_invalid() without return types