docstr: Test build submit sql data for analyticDB spark as expected.
docstr_tok: ["Test","build","submit","sql","data","for","analyticDB","spark","as","expected","."]
code: def test_build_submit_sql_data(self):
      """Test build submit sql data for analyticDB spark as expected."""
      res_data = self.hook.build_submit_sql_data(
          sql="""
              set spark.executor.instances=1;
              show databases;
              """,
          conf={"spark.executor.instances": 2},
          driver_resource_spec="medium",
          executor_resource_spec="medium",
          num_executors=3,
          name="test",
      )
      except_data = (
          "set spark.driver.resourceSpec = medium;set spark.executor.resourceSpec = medium;set "
          "spark.executor.instances = 2;set spark.app.name = test;\n            set "
          "spark.executor.instances=1;\n            show databases;"
      )
      assert res_data == except_data
  
file_path: airflow/tests/providers/alibaba/cloud/hooks/test_analyticdb_spark.py
imports: from __future__ import annotations
  from unittest import mock
  from alibabacloud_adb20211201.models import GetSparkAppLogResponse, GetSparkAppLogResponseBody, GetSparkAppLogResponseBodyData, GetSparkAppStateResponse, GetSparkAppStateResponseBody, GetSparkAppStateResponseBodyData, GetSparkAppWebUiAddressResponse, GetSparkAppWebUiAddressResponseBody, GetSparkAppWebUiAddressResponseBodyData, KillSparkAppResponse, SubmitSparkAppResponse
  from airflow.providers.alibaba.cloud.hooks.analyticdb_spark import AnalyticDBSparkHook
  from tests.providers.alibaba.cloud.utils.analyticdb_spark_mock import mock_adb_spark_hook_default_project_id
label_desc: Use image node_id 3 for calling the TestAnalyticDBSparkHook obj's underlying member method code with example usage: obj.test_build_submit_sql_data() without return types