'Test error handling.
Test error handling when attempting a delete of a backup
with no service defined for that backup, relates to bug #1162908'

def test_delete_backup_with_no_service(self):

    vol_id = self._create_volume_db_entry(size=1)
    backup = self._create_backup_db_entry(status=fields.BackupStatus.DELETING, volume_id=vol_id)
    backup.service = None
    backup.save()
    self.backup_mgr.delete_backup(self.ctxt, backup)
