Fix test on Python 2.6
Fix test on Python 3.2