Improve Template Tests by Removing Manual Output Buffering

Follows #8304 

@DeepDiver1975 @LukasReschke @schiesbn