fix tests for python 3