'Test attempting to set inventory to an unknown resource class raises
an exception.'

def test_set_inventory_unknown_resource_class(self):

    rp = objects.ResourceProvider(context=self.ctx, uuid=uuidsentinel.rp_uuid, name='compute-host')
    rp.create()
    inv = objects.Inventory(resource_provider=rp, resource_class='UNKNOWN', total=1024, reserved=15, min_unit=10, max_unit=100, step_size=10, allocation_ratio=1.0)
    inv_list = objects.InventoryList(objects=[inv])
    self.assertRaises(exception.ResourceClassNotFound, rp.set_inventory, inv_list)
