Fix tests in py2.6