@mock.patch('certbot._internal.storage.renewal_file_for_certname')
@mock.patch('certbot._internal.cert_manager.match_and_check_overlaps')
@mock.patch('certbot._internal.storage.full_archive_path')
@mock.patch('certbot._internal.cert_manager.cert_path_to_lineage')
@mock.patch('certbot._internal.cert_manager.delete')
@test_util.patch_get_utility()
def test_noninteractive_deletion(self, mock_get_utility, mock_delete, mock_cert_path_to_lineage, mock_full_archive_dir, mock_match_and_check_overlaps, mock_renewal_file_for_certname):
    config = self.config
    config.namespace.noninteractive_mode = True
    config.cert_path = '/some/reasonable/path'
    config.certname = ''
    mock_cert_path_to_lineage.return_value = 'example.com'
    mock_full_archive_dir.return_value = ''
    mock_match_and_check_overlaps.return_value = ''
    self._call(config)
    self.assertEqual(mock_delete.call_count, 1)
@mock.patch('certbot._internal.storage.renewal_file_for_certname')
@mock.patch('certbot._internal.cert_manager.match_and_check_overlaps')
@mock.patch('certbot._internal.storage.full_archive_path')
@mock.patch('certbot._internal.cert_manager.cert_path_to_lineage')
@mock.patch('certbot._internal.cert_manager.delete')
@test_util.patch_get_utility()
def test_noninteractive_deletion(self, mock_get_utility, mock_delete, mock_cert_path_to_lineage, mock_full_archive_dir, mock_match_and_check_overlaps, mock_renewal_file_for_certname):
    config = self.config
    config.namespace.noninteractive_mode = True
    config.cert_path = '/some/reasonable/path'
    config.certname = 
    mock_cert_path_to_lineage.return_value = 'example.com'
    mock_full_archive_dir.return_value = 
    mock_match_and_check_overlaps.return_value = 
    self._call(config)
    self.assertEqual(mock_delete.call_count, 1)