Fix failing tests in Py2.6