minor DRY to funcion tests