Fix a minor bug on python test code template