Made test compatible with Python 3.