fixed running tests in python3

fixed run test under python3 after convert by using 2to3 tool