Fix test error on Python 2.6