docstr: :class:`~.MsSqlOperator` should use the hook returned by :meth:`airflow.models.Connection.get_hook`
  if one is returned.
  
  This behavior is necessary in order to support usage of :class:`~.OdbcHook` with this operator.
  
  Specifically we verify here that :meth:`~.MsSqlOperator.get_hook` returns the hook returned from a
  call of ``get_hook`` on the object returned from :meth:`~.BaseHook.get_connection`.
docstr_tok: [":","class",":","`","~.MsSqlOperator","`","should","use","the","hook","returned","by",":","meth",":","`","airflow.models.Connection.get_hook","`","if","one","is","returned",".","This","behavior","is","necessary","in","order","to","support","usage","of",":","class",":","`","~.OdbcHook","`","with","this","operator",".","Specifically","we","verify","here","that",":","meth",":","`","~.MsSqlOperator.get_hook","`","returns","the","hook","returned","from","a","call","of","``","get_hook","``","on","the","object","returned","from",":","meth",":","`","~.BaseHook.get_connection","`","."]
code: def test_get_hook_from_conn(self, mock_get_db_hook):
      """
      :class:`~.MsSqlOperator` should use the hook returned by :meth:`airflow.models.Connection.get_hook`
      if one is returned.
  
      This behavior is necessary in order to support usage of :class:`~.OdbcHook` with this operator.
  
      Specifically we verify here that :meth:`~.MsSqlOperator.get_hook` returns the hook returned from a
      call of ``get_hook`` on the object returned from :meth:`~.BaseHook.get_connection`.
      """
      mock_hook = MagicMock()
      mock_get_db_hook.return_value = mock_hook
  
      op = MsSqlOperator(task_id="test", sql="")
      assert op.get_db_hook() == mock_hook
  
imports: from __future__ import annotations
  from unittest import mock
  from unittest.mock import MagicMock, Mock
  import pytest
  from airflow.exceptions import AirflowException
label_desc: Use image node_id 1 for calling the TestMsSqlOperator obj's underlying member method code with example usage: obj.test_get_hook_from_conn(mock_get_db_hook) without return types