Made unit test compatible with Python 3.