Fix tests for python2.6