fix python3 error in tests