code: def test_get_query_results(self, mock_op_get_hook, sql, parameters):
      test_df = pd.DataFrame({"a": "1", "b": "2"}, index=[0, 1])
      mock_get_pandas_df = mock.MagicMock(return_value=test_df)
      mock_hook = mock.MagicMock()
      mock_hook.get_pandas_df = mock_get_pandas_df
      mock_op_get_hook.return_value = mock_hook
      op_kwargs = {
          **self.default_op_kwargs,
          "sql": sql,
          "parameters": parameters,
      }
      op = BaseSqlToSlackOperator(
          task_id="test_get_query_results", **op_kwargs
      )
      df = op._get_query_results()
      mock_get_pandas_df.assert_called_once_with(
          sql, parameters=parameters
      )
      assert df is test_df
  
file_path: airflow/tests/providers/slack/transfers/test_base_sql_to_slack.py
imports: from __future__ import annotations
  from unittest import mock
  import pandas
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.slack.transfers.base_sql_to_slack import BaseSqlToSlackOperator
label_desc: Use image node_id 5 for calling the TestBaseSqlToSlackOperator obj's underlying member method code with example usage: obj.test_get_query_results(mock_op_get_hook, sql, parameters) without return types