python tests: Make test even more compatible with Python 2.6