class_docstr: Test get, post and raise_for_status
class_docstr_tok: ["Test","get",",","post","and","raise_for_status"]
code: def test_hook_ignore_max_redirects_from_extra_field_as_header(self):
      airflow_connection = get_airflow_connection_with_extra(
          extra={"bearer": "test", "max_redirects": 3}
      )
      with mock.patch(
          "airflow.hooks.base.BaseHook.get_connection",
          side_effect=airflow_connection,
      ):
          expected_conn = airflow_connection()
          conn = self.get_hook.get_conn()
          assert (
              dict(conn.headers, **json.loads(expected_conn.extra))
              != conn.headers
          )
          assert conn.headers.get("bearer") == "test"
          assert conn.headers.get("allow_redirects") is None
          assert conn.proxies == {}
          assert conn.stream is False
          assert conn.verify is True
          assert conn.cert is None
          assert conn.max_redirects == 3
  
imports: from __future__ import annotations
  import contextlib
  import functools
  import json
  import logging
  import os
  from http import HTTPStatus
  from unittest import mock
  import pytest
  import requests
  import tenacity
  from aioresponses import aioresponses
  from requests.adapters import Response
  from requests.auth import AuthBase, HTTPBasicAuth
  from requests.models import DEFAULT_REDIRECT_LIMIT
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.http.hooks.http import HttpAsyncHook, HttpHook
label_desc: Use image node_id 6 for calling the TestHttpHook obj's underlying member method code with example usage: obj.test_hook_ignore_max_redirects_from_extra_field_as_header() without return types