Fix test on Python 2.5/2.6