Fix tests in Python 2.6