Fix tests on Py2.6