Fix test syntax for python2.7