Fix a test for Python 3