def METHOD_NAME(
    self, mock_installed_items, mock_input, mock_stdout, mock_exit
):
    mock_installed_items.return_value = ["foo_app"]
    mock_input.side_effect = ["foo", "no"]
    mock_exit.side_effect = SystemExit
    cmd = tethys_app_uninstall.Command()
    self.assertRaises(
        SystemExit,
        cmd.handle,
        app_or_extension=["tethysapp.foo_app"],
        is_extension=False,
        is_forced=False,
    )
    mock_installed_items.assert_called_with(apps=True, extensions=False)
    self.assertIn("Uninstall cancelled by user.", mock_stdout.getvalue())