Fix the tests on Python 3