Fixed a test failure with Python 3.