'This should induce retries then raise rbd.ImageBusy.'

@common_mocks
def test_try_delete_base_image_busy(self):

    backup_name = self.service._get_backup_base_name(self.volume_id, self.backup_id)
    rbd = self.mock_rbd.RBD.return_value
    rbd.list.return_value = [backup_name]
    rbd.remove.side_effect = self.mock_rbd.ImageBusy
    with mock.patch.object(self.service, 'get_backup_snaps') as mock_get_backup_snaps:
        self.assertRaises(self.mock_rbd.ImageBusy, self.service._try_delete_base_image, self.backup)
        self.assertTrue(mock_get_backup_snaps.called)
    self.assertTrue(rbd.list.called)
    self.assertTrue(rbd.remove.called)
    self.assertIn(MockImageBusyException, RAISED_EXCEPTIONS)
