update test cases to be python3 compatible