def test_allocations_get_destroyed_after_destroying_a_node_by_uuid(self):
    node = utils.create_test_node()
    allocation = utils.create_test_allocation(node_id=node.id)
    self.dbapi.destroy_node(node.uuid)
    self.assertRaises(exception.AllocationNotFound, self.dbapi.get_allocation_by_id, allocation.id)
def test_allocations_get_destroyed_after_destroying_a_node_by_uuid(self):
    node = utils.create_test_node()
    allocation = utils.create_test_allocation(node_id=node.id)
    self.dbapi.destroy_node(node.uuid)
    self.assertRaises(exception.AllocationNotFound, self.dbapi.get_allocation_by_id, allocation.id)