Update python test script to work with python3