Update test codes on py3