Made a test compatible with Python 2 and 3.