'Test creating a backup from a volume with a bad status.'

def test_create_backup_with_bad_volume_status(self):

    vol_id = self._create_volume_db_entry(status='restoring', size=1)
    backup = self._create_backup_db_entry(volume_id=vol_id)
    self.assertRaises(exception.InvalidVolume, self.backup_mgr.create_backup, self.ctxt, backup)
