docstr: Checks that the DB instance waiter uses custom wait logic when AWS boto waiters aren't available
docstr_tok: ["Checks","that","the","DB","instance","waiter","uses","custom","wait","logic","when","AWS","boto","waiters","are","n't","available"]
code: def test_wait_for_db_instance_state_custom_waiter(
      self, rds_hook: RdsHook, db_instance_id: str
  ):
      """Checks that the DB instance waiter uses custom wait logic when AWS boto waiters aren't available"""
      with patch.object(rds_hook, "_wait_for_state") as mock:
          rds_hook.wait_for_db_instance_state(
              db_instance_id, target_state="stopped", **self.waiter_args
          )
          mock.assert_called_once()
  
      with patch.object(
          rds_hook, "get_db_instance_state", return_value="stopped"
      ) as mock:
          rds_hook.wait_for_db_instance_state(
              db_instance_id, target_state="stopped", **self.waiter_args
          )
          mock.assert_called_once_with(db_instance_id)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Generator
  from unittest.mock import patch
  import pytest
  from moto import mock_rds
  from airflow.exceptions import AirflowException, AirflowNotFoundException
  from airflow.providers.amazon.aws.hooks.rds import RdsHook
label_desc: Use image node_id 4 for calling the TestRdsHook obj's underlying member method code with example usage: obj.test_wait_for_db_instance_state_custom_waiter(rds_hook, db_instance_id) without return types