'Test error handling.
Test error handling when exporting a backup record with a backup
with a bad status.'

def test_export_record_with_bad_backup_status(self):

    vol_id = self._create_volume_db_entry(status='available', size=1)
    backup = self._create_backup_db_entry(status=fields.BackupStatus.ERROR, volume_id=vol_id)
    self.assertRaises(exception.InvalidBackup, self.backup_mgr.export_record, self.ctxt, backup)
