docstr: Test `SlackWebhookHook.send_dict` warn users about Legacy Slack Integrations.
docstr_tok: ["Test","`","SlackWebhookHook.send_dict","`","warn","users","about","Legacy","Slack","Integrations","."]
code: def test_hook_send_dict_legacy_slack_integration(
      self, mock_webhook_client_cls, legacy_attr
  ):
      """Test `SlackWebhookHook.send_dict` warn users about Legacy Slack Integrations."""
      mock_webhook_client = mock_webhook_client_cls.return_value
      mock_webhook_client_send_dict = mock_webhook_client.send_dict
      mock_webhook_client_send_dict.return_value = MOCK_WEBHOOK_RESPONSE
  
      legacy_slack_integration_body = {legacy_attr: "test-value"}
      hook = SlackWebhookHook(slack_webhook_conn_id=TEST_CONN_ID)
      warning_message = (
          r"You cannot override the default channel \(chosen by the user who installed your app\), "
          r"username, or icon when you're using Incoming Webhooks to post messages\. "
          r"Instead, these values will always inherit from the associated Slack app configuration\. "
          r"See: .*\. It is possible to change this values only in "
          r"Legacy Slack Integration Incoming Webhook: .*"
      )
      with pytest.warns(UserWarning, match=warning_message):
          hook.send_dict(body=legacy_slack_integration_body)
      mock_webhook_client_send_dict.assert_called_once_with(
          legacy_slack_integration_body, headers=None
      )
  
imports: from __future__ import annotations
  import json
  import os
  from typing import Any
  from unittest import mock
  from unittest.mock import patch
  import pytest
  from slack_sdk.http_retry.builtin_handlers import ConnectionErrorRetryHandler, RateLimitErrorRetryHandler
  from slack_sdk.webhook.webhook_response import WebhookResponse
  from airflow.exceptions import AirflowException, AirflowNotFoundException
  from airflow.models.connection import Connection
  from airflow.providers.slack.hooks.slack_webhook import SlackWebhookHook, check_webhook_response
label_desc: Use image node_id 10 for calling the TestSlackWebhookHook obj's underlying member method code with example usage: obj.test_hook_send_dict_legacy_slack_integration(mock_webhook_client_cls, legacy_attr) without return types