class_docstr: Test case with a patched `DeleteCacheCommand` to test `.run()` without testing
  the manual review.
class_docstr_tok: ["Test","case","with","a","patched","`","DeleteCacheCommand","`","to","test","`",".run","(",")","`","without","testing","the","manual","review","."]
docstr: Test command run with a mocked manual review step.
docstr_tok: ["Test","command","run","with","a","mocked","manual","review","step","."]
code: def test_run_and_delete_with_tui(
      self,
      mock_scan_cache_dir: Mock,
      mock__manual_review_tui: Mock,
      mock__get_expectations_str: Mock,
      mock_confirm: Mock,
  ) -> None:
      """Test command run with a mocked manual review step."""
      # Mock return values
      mock__manual_review_tui.return_value = ["hash_1", "hash_2"]
      mock__get_expectations_str.return_value = "Will delete A and B."
      mock_confirm.return_value.execute.return_value = True
      mock_scan_cache_dir.return_value = _get_cache_mock()
  
      # Run
      self.command.disable_tui = False
      with capture_output() as output:
          self.command.run()
  
      # Step 1: scan
      mock_scan_cache_dir.assert_called_once_with(self.args.dir)
      cache_mock = mock_scan_cache_dir.return_value
  
      # Step 2: manual review
      mock__manual_review_tui.assert_called_once_with(
          cache_mock, preselected=[]
      )
  
      # Step 3: ask confirmation
      mock__get_expectations_str.assert_called_once_with(
          cache_mock, ["hash_1", "hash_2"]
      )
      mock_confirm.assert_called_once_with(
          "Will delete A and B. Confirm deletion ?", default=True
      )
      mock_confirm().execute.assert_called_once_with()
  
      # Step 4: delete
      cache_mock.delete_revisions.assert_called_once_with(
          "hash_1", "hash_2"
      )
      strategy_mock = cache_mock.delete_revisions.return_value
      strategy_mock.execute.assert_called_once_with()
  
      # Check output
      self.assertEqual(
          output.getvalue(),
          "Start deletion.\nDone. Deleted 0 repo(s) and 0 revision(s) for a total of 5.1M.\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 2 for calling the TestMockedDeleteCacheCommand obj's underlying member method code with example usage: obj.test_run_and_delete_with_tui(mock_scan_cache_dir, mock__manual_review_tui, mock__get_expectations_str, mock_confirm) without return types