Adding compatibility of tests to python 2.6