Fix test failuer on Python 3.