Make the tests compatible with Python 3