code: def test_spark_process_runcmd_with_str(self, mock_popen):
      # Given
      mock_popen.return_value.wait.return_value = 0
  
      # When
      hook = SparkSqlHook(conn_id="spark_default", sql="SELECT 1")
      hook.run_query("--deploy-mode cluster")
  
      # Then
      assert mock_popen.mock_calls[0] == call(
          [
              "spark-sql",
              "-e",
              "SELECT 1",
              "--master",
              "yarn://yarn-master",
              "--name",
              "default-name",
              "--verbose",
              "--queue",
              "default",
              "--deploy-mode",
              "cluster",
          ],
          stderr=-2,
          stdout=-1,
          universal_newlines=True,
      )
  
file_path: airflow/tests/providers/apache/spark/hooks/test_spark_sql.py
imports: from __future__ import annotations
  import itertools
  from io import StringIO
  from unittest.mock import call, patch
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.apache.spark.hooks.spark_sql import SparkSqlHook
  from airflow.utils import db
  from tests.test_utils.db import clear_db_connections
label_desc: Use image node_id 5 for calling the TestSparkSqlHook obj's underlying member method code with example usage: obj.test_spark_process_runcmd_with_str(mock_popen) without return types