Fix unit test portability issue for python 2.6