a  ze @sddlZddlZddlZddlZddlZddlZddlmZddlmZddl m Z m Z e Gddde Z e Gddde Z ed kredS) Npolicy)HeaderRegistry) TestEmailBase parameterizec@s:eZdZeZeddZdddddZdd Zd d Zd S) TestPickleCopyHeadersubjectthis is a test)rr )fromfrodo@mordor.net)toza: k@b.com, y@z.com;, j@f.com)dateTue, 29 May 2012 09:24:26 +1000)rr r r cCs.|||}t|}|t|t|dSN)header_factorycopydeepcopy assertEqualstr)selfnamevalueheaderhrS/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_email/test_pickleable.pyheader_as_deepcopys  z'TestPickleCopyHeader.header_as_deepcopycCsN|||}ttjdD].}t||}t|}|t|t|qdSN)rrangepickleHIGHEST_PROTOCOLdumpsloadsrr)rrrrprotoprrrrheader_as_pickles    z%TestPickleCopyHeader.header_as_pickleN) __name__ __module__ __qualname__rrZ unstructuredZ header_paramsrr&rrrrr s rc@seZdZiZejedej dfed<ej j ej dfed<deddd<deddd <d eddd <d eddd <edd dddZ ddZdS)TestPickleCopyMessagez Date: Tue, 29 May 2012 09:24:26 +1000 From: frodo@mordor.net To: bilbo@underhill.org Subject: help I think I forgot the ring. rparsedcreatedrrZDater ZFromzbilbo@underhill.orgZTohelpZSubjectzI think I forgot the ring.cCs"t|}|||dSr)rrr as_string)rmsgmsg2rrrmsg_as_deepcopy@s z%TestPickleCopyMessage.msg_as_deepcopycCsBttjdD].}t||}t|}|||qdSr)rr r!r"r#rr.)rr/r$r%r0rrr msg_as_pickleDs  z#TestPickleCopyMessage.msg_as_pickleN)r'r(r)Z msg_paramsemailZmessage_from_stringtextwrapdedentrdefaultmessageZMessageZ set_payloadr1r2rrrrr*'s  r*__main__)Zunittestr4rr r3Z email.messagerZemail.headerregistryrZtest.test_emailrrrr*r'mainrrrrs  #