Fixed test cases for python 3k