[#1505] Fix tests on Python 2.6