Fix string compare in test on py3