'Ensure that if we send an inventory object to a backversioned 1.0
receiver, that we raise ValueError if the inventory record contains a
custom (non-standardized) resource class.'

def test_custom_resource_raises(self):

    values = {'resource_class': 'custom_resource', 'consumer_id': uuids.consumer_id, 'used': 1}
    bdm = objects.Allocation(context=self.context, **values)
    self.assertRaises(ValueError, bdm.obj_to_primitive, target_version='1.0')
