fix tests for Python 3