docstr: Test `_ask_for_confirmation_no_tui`.
docstr_tok: ["Test","`","_ask_for_confirmation_no_tui","`","."]
code: def test_ask_for_confirmation_no_tui(self, mock_input: Mock) -> None:
      """Test `_ask_for_confirmation_no_tui`."""
      # Answer yes
      mock_input.side_effect = ("y",)
      value = _ask_for_confirmation_no_tui(
          "custom message 1", default=True
      )
      mock_input.assert_called_with("custom message 1 (Y/n) ")
      self.assertTrue(value)
  
      # Answer no
      mock_input.side_effect = ("NO",)
      value = _ask_for_confirmation_no_tui(
          "custom message 2", default=True
      )
      mock_input.assert_called_with("custom message 2 (Y/n) ")
      self.assertFalse(value)
  
      # Answer invalid, then default
      mock_input.side_effect = ("foo", "")
      with capture_output() as output:
          value = _ask_for_confirmation_no_tui(
              "custom message 3", default=False
          )
      mock_input.assert_called_with("custom message 3 (y/N) ")
      self.assertFalse(value)
      self.assertEqual(
          output.getvalue(),
          "Invalid input. Must be one of ('y', 'yes', '1', 'n', 'no', '0', '')\n",
      )
  
imports: import os
  import unittest
  from pathlib import Path
  from tempfile import mkstemp
  from unittest.mock import Mock, patch
  from InquirerPy.base.control import Choice
  from InquirerPy.separator import Separator
  from huggingface_hub.commands.delete_cache import _CANCEL_DELETION_STR, DeleteCacheCommand, _ask_for_confirmation_no_tui, _get_expectations_str, _get_tui_choices_from_scan, _manual_review_no_tui, _read_manual_review_tmp_file
  from huggingface_hub.utils import SoftTemporaryDirectory, capture_output
  from .testing_utils import handle_injection
label_desc: Use image node_id 7 for calling the TestDeleteCacheHelpers obj's underlying member method code with example usage: obj.test_ask_for_confirmation_no_tui(mock_input) without return types