Fix tests in Python2.6