code: def test_context_manager(self, get_conn_mock, register_session):
      get_conn_mock.return_value = CONNECTION
      register_session.return_value = None
      with SambaHook("samba_default"):
          args, kwargs = tuple(register_session.call_args_list[0])
          assert args == (CONNECTION.host,)
          assert kwargs == {
              "username": CONNECTION.login,
              "password": CONNECTION.password,
              "port": 445,
              "connection_cache": {},
          }
          cache = kwargs.get("connection_cache")
          mock_connection = mock.Mock()
          mock_connection.disconnect.return_value = None
          cache["foo"] = mock_connection
  
      # Test that the connection was disconnected upon exit.
      mock_connection.disconnect.assert_called_once()
  
file_path: airflow/tests/providers/samba/hooks/test_samba.py
imports: from __future__ import annotations
  from inspect import getfullargspec
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.samba.hooks.samba import SambaHook
label_desc: Use image node_id 2 for calling the TestSambaHook obj's underlying member method code with example usage: obj.test_context_manager(get_conn_mock, register_session) without return types