add basic testing to generator

Need to rename the main Flask object to app to avoid naming conflicts.