DRY: Avoid repetitions in script_test

Simple "don't repeat yourself" changes in script_test.