Make testcases more python2.7/2.6 compat