docstr: Test operator when the groupby_kwargs is specified
docstr_tok: ["Test","operator","when","the","groupby_kwargs","is","specified"]
code: def test_with_groupby_kwarg(self):
      """
      Test operator when the groupby_kwargs is specified
      """
      query = "query"
      s3_bucket = "bucket"
      s3_key = "key"
  
      op = SqlToS3Operator(
          query=query,
          s3_bucket=s3_bucket,
          s3_key=s3_key,
          sql_conn_id="mysql_conn_id",
          aws_conn_id="aws_conn_id",
          task_id="task_id",
          replace=True,
          pd_kwargs={"index": False, "header": False},
          groupby_kwargs={"by": "Team"},
          dag=None,
      )
      example = {
          "Team": ["Australia", "Australia", "India", "India"],
          "Player": [
              "Ricky",
              "David Warner",
              "Virat Kohli",
              "Rohit Sharma",
          ],
          "Runs": [345, 490, 672, 560],
      }
  
      df = pd.DataFrame(example)
      data = []
      for group_name, df in op._partition_dataframe(df):
          data.append((group_name, df))
      data.sort(key=lambda d: d[0])
      team, df = data[0]
      assert df.equals(
          pd.DataFrame(
              {
                  "Team": ["Australia", "Australia"],
                  "Player": ["Ricky", "David Warner"],
                  "Runs": [345, 490],
              }
          )
      )
      team, df = data[1]
      assert df.equals(
          pd.DataFrame(
              {
                  "Team": ["India", "India"],
                  "Player": ["Virat Kohli", "Rohit Sharma"],
                  "Runs": [672, 560],
              }
          )
      )
  
file_path: airflow/tests/providers/amazon/aws/transfers/test_sql_to_s3.py
imports: from __future__ import annotations
  from tempfile import NamedTemporaryFile
  from unittest import mock
  import pandas
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.amazon.aws.transfers.sql_to_s3 import SqlToS3Operator
label_desc: Use image node_id 6 for calling the TestSqlToS3Operator obj's underlying member method code with example usage: obj.test_with_groupby_kwarg() without return types