docstr: When both prefixed and unprefixed values are found in extra (e.g.
  extra__snowflake__account and account), we should prefer the short
  name.
docstr_tok: ["When","both","prefixed","and","unprefixed","values","are","found","in","extra","(","e.g",".","extra__snowflake__account","and","account",")",",","we","should","prefer","the","short","name","."]
code: def test_extra_short_beats_long(self, include_unprefixed):
      """When both prefixed and unprefixed values are found in extra (e.g.
      extra__snowflake__account and account), we should prefer the short
      name."""
      extras = dict(
          account="account",
          warehouse="warehouse",
          database="database",
          region="region",
          role="role",
      )
      extras_prefixed = {
          f"extra__snowflake__{k}": f"{v}_prefixed"
          for k, v in extras.items()
      }
      with mock.patch.dict(
          "os.environ",
          AIRFLOW_CONN_TEST_CONN=Connection(
              conn_type="any",
              extra=json.dumps(
                  {
                      **(extras if include_unprefixed else {}),
                      **extras_prefixed,
                  }
              ),
          ).get_uri(),
      ):
          assert list(extras.values()) != list(extras_prefixed.values())
          assert SnowflakeHook(
              snowflake_conn_id="test_conn"
          )._get_conn_params() == {
              "user": None,
              "password": "",
              "application": "AIRFLOW",
              "schema": "",
              "authenticator": "snowflake",
              "session_parameters": None,
              **(
                  extras
                  if include_unprefixed
                  else dict(
                      zip(extras.keys(), extras_prefixed.values())
                  )
              ),
          }
  
imports: from __future__ import annotations
  import json
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any
  from unittest import mock
  import pytest
  from cryptography.hazmat.backends import default_backend
  from cryptography.hazmat.primitives import serialization
  from cryptography.hazmat.primitives.asymmetric import rsa
  from airflow.models import Connection
  from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
label_desc: Use image node_id 4 for calling the TestPytestSnowflakeHook obj's underlying member method code with example usage: obj.test_extra_short_beats_long(include_unprefixed) without return types