make test: add python3 compatibility in extend_packet