fix tests on python 3.x