Fix tests for py2.6