Fix failing test under Python 3.