def test_update_node_name_duplicate(self):
    node1 = utils.create_test_node(uuid=uuidutils.generate_uuid(), name='spam')
    node2 = utils.create_test_node(uuid=uuidutils.generate_uuid())
    self.assertRaises(exception.DuplicateName, self.dbapi.update_node, node2.id, {'name': node1.name})
def test_update_node_name_duplicate(self):
    node1 = utils.create_test_node(uuid=uuidutils.generate_uuid(), name='spam')
    node2 = utils.create_test_node(uuid=uuidutils.generate_uuid())
    self.assertRaises(exception.DuplicateName, self.dbapi.update_node, node2.id, {'name': node1.name})