Fix tests on python2.6