fix test compatible with py3