Fix broken test on Python 3