Fixed tests on Python 3.