def test_create_node_instance_already_associated(self):
    instance = uuidutils.generate_uuid()
    utils.create_test_node(uuid=uuidutils.generate_uuid(), instance_uuid=instance)
    self.assertRaises(exception.InstanceAssociated, utils.create_test_node, uuid=uuidutils.generate_uuid(), instance_uuid=instance)
def test_create_node_instance_already_associated(self):
    instance = uuidutils.generate_uuid()
    utils.create_test_node(uuid=uuidutils.generate_uuid(), instance_uuid=instance)
    self.assertRaises(exception.InstanceAssociated, utils.create_test_node, uuid=uuidutils.generate_uuid(), instance_uuid=instance)