Testsuite: fixes for python2.6 support

Authored by thomie on Jun 29 2016, 6:16 AM.