docstr: Test secrets are masked when loaded directly from the DB
code: def test_masking_from_db(self):
      """Test secrets are masked when loaded directly from the DB"""
      from airflow.settings import Session
  
      session = Session()
  
      try:
          conn = Connection(
              conn_id=f"test-{os.getpid()}",
              conn_type="http",
              password="s3cr3t",
              extra='{"apikey":"masked too"}',
          )
          session.add(conn)
          session.flush()
  
          # Make sure we re-load it, not just get the cached object back
          session.expunge(conn)
  
          self.mask_secret.reset_mock()
  
          from_db = session.get(Connection, conn.id)
          from_db.extra_dejson
  
          assert self.mask_secret.mock_calls == [
              # We should have called it _again_ when loading from the DB
              mock.call("s3cr3t"),
              mock.call({"apikey": "masked too"}),
          ]
      finally:
          session.rollback()
  
imports: from __future__ import annotations
  import json
  import os
  import re
  from collections import namedtuple
  from unittest import mock
  import pytest
  import sqlalchemy
  from cryptography.fernet import Fernet
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection, crypto
  from airflow.providers.sqlite.hooks.sqlite import SqliteHook
  from airflow.providers_manager import HookInfo
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 22 for calling the TestConnection obj's underlying member method code with example usage: obj.test_masking_from_db() without return types