fix tests in python 3.x