test/multipart: reorganize creation of multipart message