Fix tests on py2.6