docstr: Test to validate connection failure scenario on SELECT 1 query
docstr_tok: ["Test","to","validate","connection","failure","scenario","on","SELECT","1","query"]
code: def test_validate_session_dbapi_exception(self, mock_session):
      """
      Test to validate connection failure scenario on SELECT 1 query
      """
      mock_session.side_effect = sqlalchemy.exc.OperationalError(
          "m1", "m2", "m3", "m4"
      )
      assert airflow.settings.validate_session() is False
  
imports: from __future__ import annotations
  import importlib
  import os
  from argparse import Namespace
  from unittest import mock
  import pytest
  import sqlalchemy
  import airflow
  from airflow.cli import cli_parser
  from airflow.cli.commands import celery_command
  from airflow.configuration import conf
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 3 for calling the TestWorkerPrecheck obj's underlying member method code with example usage: obj.test_validate_session_dbapi_exception(mock_session) without return types