fix tests for python2/3