+
    Bi                    >   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIHtHtHt ^ R	IHtHtHt ^ R
IHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t* ^ RI+H,t, ^ RI-H.t. ^ RI/H0t0 ^ RI1H2t2H3t3 ^ RIH4t4 ^ RIH5t5 ^ RIH6t6 ^ RIH7t7 ^ RIH8t8 ^ RIH9t9 ^ RI:H;t; ^ RI<H=t= ^ RI>H?t? ^ RI@HAtAHBtB ^ RI1HCtC R tDR!tER"tF ! R# R$]B4      tG ! R% R&]P                  4      tI ! R' R(]B4      tJ ! R) R*]P                  4      tK ! R+ R,]P                  4      tL ! R- R.]P                  4      tM ! R/ R0]P                  4      tN ! R1 R2]P                  4      tO ! R3 R4]B4      tP ! R5 R6]B4      tQ ! R7 R8]B4      tR ! R9 R:]B4      tS ! R; R<]B4      tT ! R= R>]B4      tU ! R? R@]B4      tV ! RA RB]B4      tW ! RC RD]B4      tX ! RE RF]B4      tY ! RG RH]B4      tZ ! RI RJ4      t[ ! RK RL][]U4      t\ ! RM RN][]U4      t] ! RO RP]P                  4      t^ ! RQ RR]P                  4      t_ ! RS RT]P                  4      t` ! RU RV]B4      ta ! RW RX]B4      tb ! RY RZ]B4      tc ! R[ R\]B4      td]eR]8X  d   ]P                  ! 4        R# R# )^    N)StringIOBytesIO)chainchoice)Thread)patch)Charset)	GeneratorDecodedGeneratorBytesGenerator)Headerdecode_headermake_header)HeaderRegistry)Message)MIMEApplication)	MIMEAudio)MIMEBase)	MIMEImage)MIMEMessage)MIMEMultipart)MIMENonMultipart)MIMEText)ParserHeaderParser)
base64mime)encoderserrors)	iterators)
quoprimime)utils)support)threading_helper)unlink)openfileTestEmailBase)
FeedParser
  c                   B  a  ] tR t^9t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3R1 t4R2 t5R3 t6R4 t7R5 t8R6 t9R7 t:R8 t;R9 t<R: t=R; t>R< t?R= t@R> tAR? tBR@ tCRA tDRB tERC tFRD tGRE tHRF tIRG tJRH tKRI tLRJ tMRK tNRL tORM tPRN tQRO tRRP tSRQ tTRR tURS tVRT tWRU tXRV tYRW tZRX t[RY t\RZ t]R[ t^R\t_V t`R]# )^TestMessageAPIc                    V P                   pV P                  R 4      pV! VP                  R4      . RO4       V! VP                  RR4      R4       R# )z
msg_20.txtccxxzn/aN)zccc@zzz.orgzddd@zzz.orgzeee@zzz.org)assertEqual_msgobjget_allselfeqmsgs   &  1/usr/lib/python3.14/test/test_email/test_email.pytest_get_allTestMessageAPI.test_get_all:   sD    ll<(
3;;tKL
3;;tU#U+    c                   V P                   p\        4       pV! VP                  4       R 4       \        R4      pVP	                  V4       V! VR,          R4       V! VP                  4       R4       V! VR,          R4       V! VP                  R4      R4       V! VR,          R	4       V! VP                  4       P                  R4       VP	                  R 4       V! VP                  4       R 4       V! VR,          R4       \        4       pR
VR&   RVR&   RVR&   VP	                  V4       V! VR,          R
4       V! VR,          R4       V! VR,          R4       R # )N
iso-8859-1mime-versionz1.0
text/plaincontent-typez text/plain; charset="iso-8859-1"charsetcontent-transfer-encodingquoted-printablez2.0zMIME-Versionztext/x-weirdContent-Typezquinted-puntableContent-Transfer-Encodingz"text/x-weird; charset="iso-8859-1")r2   r   get_charsetr
   set_charsetget_content_type	get_paraminput_charsetr6   r7   r8   rB   s   &   r9   test_getset_charset"TestMessageAPI.test_getset_charset@   s6   i
3??d#,' 
3~&
3!<0
3~ BC
3==#\2
3*+-?@
3??**L9
3??d#
3~-i#N,N+='( 
3~&
3~ DE
3*+-?@r<   c                    V P                   p\        4       pVP                  R 4       V! VP                  4       P                  R 4       V! VR,          R4       R# )us-asciirA   text/plain; charset="us-ascii"N)r2   r   rH   rG   rK   r5   s   &  r9   test_set_charset_from_string+TestMessageAPI.test_set_charset_from_stringZ   sG    i
#
3??**J7
3~ @Ar<   c                    \        4       p\        R 4      pVP                  RV4       V P                  VP	                  4       P
                  R 4       R# )r>   zThis is a string payloadN)r   r
   set_payloadr2   rG   rK   )r6   r8   rB   s   &  r9   test_set_payload_with_charset,TestMessageAPI.test_set_payload_with_charseta   s?    i,'2G<*88,Gr<   c                   R p\        R4      p\        4       pVP                  W4       V P                  VR,          R4       V P                  VP	                  RR7      V4       V P                  VP	                  4       R4       R# )   АБВutf-8rC   base64Tdecodez	0JDQkdCS
N)r
   r   rU   r2   get_payloadr6   datarB   r8   s   &   r9   +test_set_payload_with_8bit_data_and_charset:TestMessageAPI.test_set_payload_with_8bit_data_and_charsetg   sl    *'"i&898D5t<*L9r<   c                    R p\        R4      pRVn        \        4       pVP                  VP	                  R4      V4       V P                  VR,          R4       V P                  VP                  RR7      V4       R# rY   rZ   NrC   8bitTr\   )r
   body_encodingr   rU   r]   r2   r^   r_   s   &   r9   >test_set_payload_with_non_ascii_and_charset_body_encoding_noneMTestMessageAPI.test_set_payload_with_non_ascii_and_charset_body_encoding_nonep   sh    *'" $iG,g6896B5t<r<   c                    R p\        R4      pRVn        \        4       pVP                  W4       V P	                  VR,          R4       V P	                  VP                  RR7      V4       R# rd   )r
   rf   r   rU   r2   r^   r_   s   &   r9   >test_set_payload_with_8bit_data_and_charset_body_encoding_noneMTestMessageAPI.test_set_payload_with_8bit_data_and_charset_body_encoding_noney   s]    *'" $i&896B5t<r<   c                |    \        4       pVP                  . 4       V P                  VP                  4       . 4       R # Nr   rU   r2   r^   r6   r8   s   & r9   test_set_payload_to_list'TestMessageAPI.test_set_payload_to_list   s,    i*B/r<   c                    \        4       pR VR&   VP                  R4       \        \        4       4      pV P                  \        RVP
                  V4       R# )multipart/mixedrE   zstring payloadz[Aa]ttach.*non-multipartN)r   rU   r   assertRaisesRegex	TypeErrorattach)r6   r8   sub_msgs   &  r9   "test_attach_when_payload_is_string1TestMessageAPI.test_attach_when_payload_is_string   sH    i/N()gi(y*D"zz7	4r<   c                (   V P                   pV P                  R 4      pVP                  4       pV! V. RO4       V P                  R4      pVP                  R4      pV! V. RO4       V P                  R4      pVP                  4       pV! V. RO4       R# )z
msg_08.txtNz
msg_09.txtdingbatz
msg_12.txt)NrP   r>   
iso-8859-2koi8-r)r{   rP   r>   r{   r}   )NrP   r>   Nr|   z
iso-8859-3rP   r}   )r2   r3   get_charsets)r6   r7   r8   charsetss   &   r9   test_get_charsets TestMessageAPI.test_get_charsets   s    ll<(##%
8MNll<(##I.
8   	! ll<(##%
8 : 	;r<   c                *   V P                   pV P                  R 4      pVP                  4        Uu. uF  q3P                  4       NK  	  ppV! VRR.4       V P                  R4      pVP                  ^4      pV! VP                  4       R4       R# u upi )
msg_04.txtmsg.txt
msg_07.txtdingusfish.gifNr2   r3   r^   get_filename)r6   r7   r8   p	filenamessubparts   &     r9   test_get_filename TestMessageAPI.test_get_filename   s    ll<(/2/@A/@!^^%/@	A
9y),-ll<(//!$
7!#34 Bs   Bc                    V P                   pV P                  R 4      pVP                  4        Uu. uF  q3P                  4       NK  	  ppV! VRR.4       R# u upi )z
msg_44.txtr   Nr   )r6   r7   r8   r   r   s   &    r9   %test_get_filename_with_name_parameter4TestMessageAPI.test_get_filename_with_name_parameter   sR    ll<(/2/@A/@!^^%/@	A
9y),- Bs   Ac                n    V P                   pV P                  R 4      pV! VP                  4       R4       R# )r   BOUNDARYN)r2   r3   get_boundaryr5   s   &  r9   test_get_boundary TestMessageAPI.test_get_boundary   s.    ll<(
3z*r<   c                   V P                   pV P                  R 4      pVP                  R4       VP                  4       ^,          w  r4V! VP	                  4       R4       V! VR4       V P                  R4      pVP                  R4       VP                  4       ^,          w  r4V! VP	                  4       R4       V! VR4       V P                  R4      pV P                  \        P                  VP                  R4       R# )
msg_01.txtr   rA   z3text/plain; charset="us-ascii"; boundary="BOUNDARY"r   z$multipart/mixed; boundary="BOUNDARY"
msg_03.txtN)r2   r3   set_boundaryitemslowerassertRaisesr    HeaderParseError)r6   r7   r8   headervalues   &    r9   test_set_boundary TestMessageAPI.test_set_boundary   s     ll<($		A
6<<>>*
5GH ll<($		A
6<<>>*
589ll<(&11**J	8r<   c                    \        R 4      pV P                  VP                  4       ^ ,          ^,          R4       VP                  4        V P	                  VP                  4       ^ ,          ^,          R4       R# )z	form-datazmultipart/form-dataz!multipart/form-data; boundary="==N)r   r2   r   	as_stringassertStartsWithro   s   & r9   test_make_boundary!TestMessageAPI.test_make_boundary   sZ    K( 	Q*,ABciik!nQ/A	Cr<   c                P   \        R RR7      ;_uu_ 4       pVP                  4       pRRR4       \        4       pVP                  X4      p\	        4       p\        VR^ 4      pVP                  VR4       V P                  VP                  4       V4       R#   + '       g   i     Lv; i)
msg_46.txtrZ   encodingNTF)	r'   readr   parsestrr   r   flattenr2   getvaluer6   fpmsgdataparserr8   outgens   &      r9   test_message_rfc822_only'TestMessageAPI.test_message_rfc822_only   sz     lW55ggiG 6oog&jT1%C1 65s   BB%	c                   \        R RR7      ;_uu_ 4       pVP                  4       P                  R4      pRRR4       \        P                  P                  4       pVP                  X4      p\        4       p\        P                  P                  V4      pVP                  V4       V P                  VP                  4       V4       R#   + '       g   i     L; i)r   rZ   r   asciiN)r'   r   encodeemailr   BytesHeaderParser
parsebytesr   	generatorr   r   r2   r   r   s   &      r9   test_byte_message_rfc822_only,TestMessageAPI.test_byte_message_rfc822_only   s    lW55ggi&&w/G 6//1(ioo,,S1C1 65s    C		C	c                   V P                   pV P                  R 4      pV! VP                  RR7      R4       V! VP                  ^ 4      P                  RR7      R4       V! VP                  ^4      P                  RR7      R4       V! VP                  ^4      P                  RR7      R4       V! VP                  ^4      P                  RR7      R4       V! VP                  ^4      P                  RR7      R4       R# )	z
msg_10.txtTr\   Ns    This is a 7bit encoded message.
s-   This is a Quoted Printable encoded message!
s!   This is a Base64 encoded message.s"   This is a Base64 encoded message.
s/   This has no Content-Transfer-Encoding: header.
)r2   r3   r^   r5   s   &  r9   test_get_decoded_payload'TestMessageAPI.test_get_decoded_payload   s    ll<(
3??$?'.
3??1)))6/	1 	3??1)))6?	A 	3??1)))6/	1 	3??1)))61	3 	3??1)))6>	@r<   c                    V P                   p\        4       pVP                  R 4       R F   pW2R&   V! VP                  RR7      R4       K"  	  VP                  R4       V! VP                  RR7      R4       R# )	z$begin 666 -
+:&5L;&\@=V]R;&0 
 
end
rC   Tr\      hello worldfoos   fooNz
x-uuencodeuuencodeuuezx-uue)r2   r   rU   r^   )r6   r7   r8   ctes   &   r9   test_get_decoded_uu_payload*TestMessageAPI.test_get_decoded_uu_payload  sl    iCD=C/2+,sd+^< > 	
3??$?'0r<   c                \    \        4       pV P                  \        VP                  ^4       R#    N)r   r   ru   r^   ro   s   & r9   *test_get_payload_n_raises_on_non_multipart9TestMessageAPI.test_get_payload_n_raises_on_non_multipart  s    i)S__a8r<   c                <   V P                   pV P                  R 4      p\        RRR7      ;_uu_ 4       pVP                  4       pRRR4       \	        4       p\        V4      pVP                  V4       V! VP                  4       X4       R#   + '       g   i     LO; i)r   z
msg_17.txtrZ   r   N)r2   r3   r'   r   r   r   r   r   )r6   r7   r8   r   textsgs   &      r9   test_decoded_generator%TestMessageAPI.test_decoded_generator  so    ll<(lW55779D 6JQ			#
1::< 65s   BB	c                   \        4       pR VR&   RVR&   V P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R# )	MeFromYoutofromFROMToTON)r   assertInro   s   & r9   test__contains__TestMessageAPI.test__contains__  so    iFD	fc"fc"fc"dC dC dC r<   c                   V P                  R 4      p\        R RR7      ;_uu_ 4       pVP                  4       pRRR4       V P                  X\	        V4      4       VP                  RR7      pVP                  R4      pV P                  V^ ,          R4       V P                  V\        P                  VR,          4      4       R#   + '       g   i     L; i)	r   rZ   r   NTunixfromr*   zFrom r   NN)
r3   r'   r   r2   strr   splitr   NLjoin)r6   r8   r   r   fullreprliness   &     r9   test_as_stringTestMessageAPI.test_as_string+  s    ll<(lW55779D 6s3x(==$=/t$eAh0rwwuRy12 65s   CC	c                   V P                  R 4      pVP                  P                  RR7      pVP                  VR7      p\	        4       p\        WBR7      pVP                  V4       V P                  W4P                  4       4       R# r   
lineseppolicyN)	r3   r   cloner   r   r   r   r2   r   r6   r8   	newpolicyr   r   r   s   &     r9   test_as_string_policy$TestMessageAPI.test_as_string_policy5  sg    ll<(JJ$$V$4	==	=2Ja*			#::<0r<   c                    \         P                  ! R 4      pVP                  R4      p\         P                  ! R4      p\        P                  ! V4      pV P                  VP                  4       V4       R# )u               MIME-Version: 1.0
            Content-type: text/plain; charset="iso-8859-1"

            Test if non-ascii messages with no Content-Transfer-Encoding set
            can be as_string'd:
            Föö bär
            r>   a%              MIME-Version: 1.0
            Content-type: text/plain; charset="iso-8859-1"
            Content-Transfer-Encoding: quoted-printable

            Test if non-ascii messages with no Content-Transfer-Encoding set
            can be as_string'd:
            F=F6=F6 b=E4r
            N)textwrapdedentr   r   message_from_bytesr2   r   r6   msourceexpectedr8   s   &    r9   #test_nonascii_as_string_without_cte2TestMessageAPI.test_nonascii_as_string_without_cte>  s`    OO   ,'?? $  &&v.(3r<   c                    \         P                  ! R 4      pVP                  R4      pVP                  RR4      p\        P
                  ! V4      pV P                  VP                  4       V4       R# )u              MIME-Version: 1.0
            Content-type: text/plain; charset="us-ascii"
            Content-Transfer-Encoding: 8bit

            Test if non-ascii messages with no Content-Transfer-Encoding set
            can be as_string'd:
            Föö bär
            r>   r   replaceNr   r   r   r]   r   r   r2   r   r   s   &    r9   *test_nonascii_as_string_with_ascii_charset9TestMessageAPI.test_nonascii_as_string_with_ascii_charsetT  s[    OO   ,'==)4&&v.(3r<   c                    \         P                  ! R 4      pVP                  R4      pVP                  RR4      p\        P
                  ! V4      pV P                  VP                  4       V4       R# )u               MIME-Version: 1.0

            Test if non-ascii messages with no Content-Type nor
            Content-Transfer-Encoding set can be as_string'd:
            Föö bär
            r>   r   r  Nr  r   s   &    r9   4test_nonascii_as_string_without_content_type_and_cteCTestMessageAPI.test_nonascii_as_string_without_content_type_and_ctec  s[    OO   ,'==)4&&v.(3r<   c                   V P                  R 4      p\        R RR7      ;_uu_ 4       pVP                  4       P                  R4      pRRR4       V P	                  X\        V4      4       VP                  RR7      pVP                  R4      pV P                  V^ ,          R4       V P	                  VRP                  VR	,          4      4       R#   + '       g   i     L; i)
r   rZ   r   r   NTr      
s   From r   )
r3   r'   r   r   r2   bytesas_bytesr   r   r   )r6   r8   r   r`   r   r   s   &     r9   test_as_bytesTestMessageAPI.test_as_bytesp  s    ll<(lW55779##G,D 6uSz*<<<.u%eAh1uzz%)45 65s    CC 	c                   V P                  R 4      pVP                  P                  RR7      pVP                  VR7      p\	        4       p\        WBR7      pVP                  V4       V P                  W4P                  4       4       R# r   )	r3   r   r   r  r   r   r   r2   r   r   s   &     r9   test_as_bytes_policy#TestMessageAPI.test_as_bytes_policyz  sg    ll<(JJ$$V$4	<<y<1I1.			#::<0r<   c                t    \         P                  ! R 4      pV P                  VP                  R4      R4       R# )zContent-Type: blarg; baz; boo
bazr+   Nr   message_from_stringr2   rJ   ro   s   & r9   test_bad_paramTestMessageAPI.test_bad_param  s,    ''(IJu-r2r<   c                v    \         P                  ! R 4      pVP                  4       pV P                  VR4       R# )ziContent-Disposition: attachment; filename*="ignored"; filename*0*="utf-8''foo%20"; filename*1*="bar.txt"
zfoo bar.txtNr   r  r   r2   r6   r8   filenames   &  r9   $test_continuation_sorting_part_order3TestMessageAPI.test_continuation_sorting_part_order  s7    ''(
 ##%=1r<   c                v    \         P                  ! R 4      pVP                  4       pV P                  VR4       R# )z6Content-Disposition: attachment; filename*="bar.txt"; zbar.txtNr  r  s   &  r9   test_sorting_no_continuations,TestMessageAPI.test_sorting_no_continuations  s7    ''&
 ##%9-r<   c                r    \         P                  ! R 4      pV P                  VP                  4       R4       R# z
From: foo
Nr   r  r2   r   ro   s   & r9   test_missing_filename$TestMessageAPI.test_missing_filename  +    ''6))+T2r<   c                r    \         P                  ! R 4      pV P                  VP                  4       R4       R# )z%Content-Disposition: blarg; filename
r+   Nr'  ro   s   & r9   test_bogus_filename"TestMessageAPI.test_bogus_filename  s.    ''02))+R0r<   c                r    \         P                  ! R 4      pV P                  VP                  4       R4       R# r&  r   r  r2   r   ro   s   & r9   test_missing_boundary$TestMessageAPI.test_missing_boundary  r*  r<   c                r   V P                   p\        P                  ! R 4      pV! VP                  RR7      . RO4       \        P                  ! R4      pV! VP                  RR7      . RO4       V! VP                  4       R4       \        P                  ! R4      pV! VP                  RR7      . RO4       R# )&X-Header: foo=one; bar=two; baz=three
x-headerr   z X-Header: foo; bar=one; baz=two
N"X-Header: foo; bar="one"; baz=two
))r   one)bartwor  three))r   r+   )r8  r7  )r  r9  )r2   r   r  
get_paramsr5   s   &  r9   test_get_paramsTestMessageAPI.test_get_params  s    ''57
3>>>,=	?''/1
3>>>,8	:
3>>T"''13
3>>>,8	:r<   c                f    \        4       pR VR&   V P                  VP                  R4      R4       R# )z>Content-Type: Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"rE   boundaryCPIMSSMTPC06p5f3tGN)r   r2   rJ   ro   s   & r9   test_get_param_liberal%TestMessageAPI.test_get_param_liberal  s-    i^Nz24HIr<   c                   V P                   p\        P                  ! R 4      pV! VP                  RRR7      R4       V! VP                  RRR7      R4       V! VP                  R4      R4       \        P                  ! R4      pV! VP                  RRR7      R	4       V! VP                  RRR7      R
4       V! VP                  RRR7      R4       R# )r3  r8  r4  r5  r9  quuzNr6  r   r+   r7  r  r2   r   r  rJ   r5   s   &  r9   test_get_paramTestMessageAPI.test_get_param  s    ''57
3==z=2E:
3==
=3T:
3== $'''13
3==z=2B7
3==z=2E:
3==z=2E:r<   c                    V P                  R 4      pV P                  VP                  ^4      P                  R4      R4       R# )z
msg_22.txtnamez
wibble.JPGN)r3   r2   r^   rJ   ro   s   & r9   'test_get_param_funky_continuation_lines6TestMessageAPI.test_get_param_funky_continuation_lines  s4    ll<(+55f=|Lr<   c                    \         P                  ! R 4      pV P                  VP                  R4      R4       V P                  VP                  RRR7      R4       R# )z4Content-Type: image/pjpeg; name="Jim&amp;&amp;Jill"
rJ  zJim&amp;&amp;JillFunquotez"Jim&amp;&amp;Jill"Nr  ro   s   & r9   #test_get_param_with_semis_in_quotes2TestMessageAPI.test_get_param_with_semis_in_quotes  sP    ''CEv.0CDvu=.	0r<   c                    \         P                  ! R 4      pV P                  VP                  R4      R4       \         P                  ! R 4      pV P                  VP                  R4      R4       R# )z5Content-Type: foo; bar*0="baz\"foobar"; bar*1="\"baz"r8  zbaz"foobar"bazNr  ro   s   & r9   test_get_param_with_quotes)TestMessageAPI.test_get_param_with_quotes  s^    ''EGu-/?@''KMu-/?@r<   c                    \         P                  ! R 4      pV P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R# )zHeader: existsr   r   HEADERheaderxN)r   r  r   assertNotInro   s   & r9   test_field_containment%TestMessageAPI.test_field_containment  sM    ''(89h$h$h$C(r<   c                   V P                   p\        4       pVP                  R R4       V! VP                  R 4      R4       VP                  RR4       V! VP                  R4      R4       V! VP                  RRR7      R4       V! VP	                  4       . RO4       V! VP	                  RR7      . RO4       VP                  R RRR	7       V! VP                  R RR	7      R4       R
# )rB   iso-2022-jp
importance
high valueFrN  "high value"ziso-9999-xxzX-Jimmyr5  N)r@   r+   )rB   r\  )r]  r^  )r`  )rB   z"iso-2022-jp")r]  r_  )r2   r   	set_paramrJ   r<  r5   s   &  r9   test_set_paramTestMessageAPI.test_set_param  s    ii/
3==#]3lL1
3==&5
3==u=5~F
3>> < 	= 	3>>%>( +G 	H 	iyA
3==9=5}Er<   c                D   V P                   pV P                  R 4      pV! VP                  4       . RO4       VP                  R4      pVP	                  R4       V! VP                  4       RR.4       VP                  RV4       V! VP                  4       RRRV3.4       R# )
msg_05.txtreport-typeNmultipart/reportr+   r@  %D1690A7AC1.996856090/mail.example.com)rg  )rf  delivery-statusri  )r2   r3   r<  rJ   	del_paramra  )r6   r7   r8   old_vals   &   r9   test_del_paramTestMessageAPI.test_del_param  s    ll<(
3>>C	D --.m$
3>>$AC	D 	mW-
3>>$AG$&	'r<   c                    \        4       pVP                  R RRR7       VP                  RR4       V P                  VR,          R4       R# )Content-Disposition
attachmentbud.gifr  r  content-dispositionNr   
add_headerrl  r2   ro   s   & r9   test_del_param_on_other_header-TestMessageAPI.test_del_param_on_other_header  sA    i,lYOj"7823\Br<   c                >    \        4       pVP                  R R4       R# )r  ru  N)r   rl  ro   s   & r9   $test_del_param_on_nonexistent_header3TestMessageAPI.test_del_param_on_nonexistent_header  s    ij"78r<   c                    \        4       pVP                  R RRR7       VR ,          pVP                  RR R7       V P                  VR ,          V4       R# )rE   r@   rZ   rB   foobarr5  Nrv  )r6   r8   existing_headers   &  r9   test_del_nonexistent_param)TestMessageAPI.test_del_nonexistent_param  sJ    i~|WEn-h~6^,o>r<   c                <   V P                   p\        4       pV P                  \        VP                  R 4       VP	                  R4       V! VR,          R4       VP                  RR4       V! VR,          R4       VP	                  R4       V! VR,          R4       R# )	r   r@   rA   rB   rP   rQ   z	text/htmlztext/html; charset="us-ascii"N)r2   r   r   
ValueErrorset_typera  r5   s   &  r9   test_set_typeTestMessageAPI.test_set_type  s    i*cllF;\"
3~-i,
3~ @A[!
3~ ?@r<   c                z    \        4       pR VR&   VP                  RR4       V P                  VR,          R4       R# )r@   zX-Content-Typeapplication/octet-streamzx-content-typeN)r   r  r2   ro   s   & r9   test_set_type_on_other_header,TestMessageAPI.test_set_type_on_other_header*  s;    i ,/1AB-.0JKr<   c                Z    \        4       pV P                  VP                  4       R 4       R# )r@   N)r   r2   rI   ro   s   & r9   test_get_content_type_missing,TestMessageAPI.test_get_content_type_missing0  s"    i--/>r<   c                |    \        4       pVP                  R 4       V P                  VP                  4       R 4       R# )message/rfc822N)r   set_default_typer2   rI   ro   s   & r9   /test_get_content_type_missing_with_default_type>TestMessageAPI.test_get_content_type_missing_with_default_type4  s2    i-.--/1ABr<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )
msg_30.txtr  Nr3   r2   r^   rI   ro   s   & r9   +test_get_content_type_from_message_implicit:TestMessageAPI.test_get_content_type_from_message_implicit9  5    ll<(+<<>)	+r<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )
msg_28.txtr  Nr  ro   s   & r9   +test_get_content_type_from_message_explicit:TestMessageAPI.test_get_content_type_from_message_explicit>  r  r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r@   Nr3   r2   rI   ro   s   & r9   6test_get_content_type_from_message_text_plain_implicitETestMessageAPI.test_get_content_type_from_message_text_plain_implicitC  )    ll<(--/>r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r@   Nr  ro   s   & r9   6test_get_content_type_from_message_text_plain_explicitETestMessageAPI.test_get_content_type_from_message_text_plain_explicitG  r  r<   c                Z    \        4       pV P                  VP                  4       R 4       R# )r   Nr   r2   get_content_maintypero   s   & r9   !test_get_content_maintype_missing0TestMessageAPI.test_get_content_maintype_missingK  s"    i113V<r<   c                |    \        4       pVP                  R 4       V P                  VP                  4       R4       R# )r  messageN)r   r  r2   r  ro   s   & r9   3test_get_content_maintype_missing_with_default_typeBTestMessageAPI.test_get_content_maintype_missing_with_default_typeO  s1    i-.113Y?r<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )r  r  Nr3   r2   r^   r  ro   s   & r9   /test_get_content_maintype_from_message_implicit>TestMessageAPI.test_get_content_maintype_from_message_implicitT  2    ll<(+@@BINr<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )r  r  Nr  ro   s   & r9   /test_get_content_maintype_from_message_explicit>TestMessageAPI.test_get_content_maintype_from_message_explicitX  r  r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r   Nr3   r2   r  ro   s   & r9   :test_get_content_maintype_from_message_text_plain_implicitITestMessageAPI.test_get_content_maintype_from_message_text_plain_implicit\  )    ll<(113V<r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r   Nr  ro   s   & r9   :test_get_content_maintype_from_message_text_plain_explicitITestMessageAPI.test_get_content_maintype_from_message_text_plain_explicit`  r  r<   c                Z    \        4       pV P                  VP                  4       R 4       R# )plainNr   r2   get_content_subtypero   s   & r9    test_get_content_subtype_missing/TestMessageAPI.test_get_content_subtype_missingd  s"    i002G<r<   c                |    \        4       pVP                  R 4       V P                  VP                  4       R4       R# )r  rfc822N)r   r  r2   r  ro   s   & r9   2test_get_content_subtype_missing_with_default_typeATestMessageAPI.test_get_content_subtype_missing_with_default_typeh  s1    i-.002H=r<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )r  r  Nr3   r2   r^   r  ro   s   & r9   .test_get_content_subtype_from_message_implicit=TestMessageAPI.test_get_content_subtype_from_message_implicitm  2    ll<(+??A8Lr<   c                    V P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )r  r  Nr  ro   s   & r9   .test_get_content_subtype_from_message_explicit=TestMessageAPI.test_get_content_subtype_from_message_explicitq  r  r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r  Nr3   r2   r  ro   s   & r9   9test_get_content_subtype_from_message_text_plain_implicitHTestMessageAPI.test_get_content_subtype_from_message_text_plain_implicitu  )    ll<(002G<r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )r   r  Nr  ro   s   & r9   9test_get_content_subtype_from_message_text_plain_explicitHTestMessageAPI.test_get_content_subtype_from_message_text_plain_explicity  r  r<   c                d    \        4       pR VR&   V P                  VP                  4       R4       R# )no-slash-in-this-stringrE   r   Nr  ro   s   & r9   test_get_content_maintype_error.TestMessageAPI.test_get_content_maintype_error}  s,    i7N113V<r<   c                d    \        4       pR VR&   V P                  VP                  4       R4       R# )r  rE   r  Nr  ro   s   & r9   test_get_content_subtype_error-TestMessageAPI.test_get_content_subtype_error  s,    i7N002G<r<   c                z   V P                   p\        4       pVP                  R R4       VP                  RR4       VP                  RR4       V! VP                  4       . RO4       V! VP	                  4       . RO4       VP                  RR4       V! VP                  4       . RO4       V! VP	                  4       . RO4       VP                  R R4       VP                  R R4       V! VP                  4       . RO4       V! VP	                  4       . RO4       V P                  \        VP
                  R	R
4       R# )FirstOneSecondTwoThirdThreeTwentyElevenOne HundredFourthMissingN)r  r  r  )r  r  r  )r  r  r  )r  r  r  r  )r  r  r  r  )r2   r   rw  keysvaluesreplace_headerr   KeyErrorr5   s   &  r9   test_replace_header"TestMessageAPI.test_replace_header  s    iw&x'w(
388:34
3::<018X.
388:34
3::<34w)7M2
388:<=
3::<EF(C$6$6)Lr<   c                   \        4       pV P                  VP                  4       4       VP                  R RRR7       V P	                  VP                  4       R4       VP                  R R4       V P	                  VP                  4       R4       VP                  R R4       V P	                  VP                  4       R4       R# )rq  rr  z
random.avirt  inlineInlinEN)r   assertIsNoneget_content_dispositionrw  r2   r  ro   s   & r9   test_get_content_disposition+TestMessageAPI.test_get_content_disposition  s    i#5578,l , 	 	.446E0(;446A0(;446Ar<   c                    R p\        4       pRVR&   RVR&   VP                  V4       V P                  VP                  RR7      R4       V P	                  VP
                  ^ ,          \        P                  4       R# )	zAwDp0P7//y6LwKEAcPa/6Q=9zaudio/x-midirA   r[   rC   Tr\   s    . pN)r   rU   r2   r^   assertIsInstancedefectsr    InvalidBase64CharactersDefectr6   xr8   s   &  r9   test_broken_base64_payload)TestMessageAPI.test_broken_base64_payload  ss    &i,N+3'(57	9 	ckk!n$BB	Dr<   c                    R p\        4       pRVR&   RVR&   VP                  V4       V P                  VP                  RR7      \	        VR4      4       R# )	u   this is a bröken thing to dor@   rA   re   rC   Tr\   zraw-unicode-escapeN)r   rU   r2   r^   r  r  s   &  r9   test_broken_unicode_payload*TestMessageAPI.test_broken_unicode_payload  sW     .i*N+1'(5q"67	9r<   c                    R P                  R4      p\        4       pRVR&   RVR&   Wn        V P                  VP	                  RR7      V4       R# )	u#   this is a quéstionable thing to dorZ   text/plain; charset="utf-8"rA   re   rC   Tr\   N)r   r   _payloadr2   r^   r  s   &  r9   test_questionable_bytes_payload.TestMessageAPI.test_questionable_bytes_payload  sP     288Ai;N+1'(5q9r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  rr  rs  rt  zattachment; filename="bud.gif"Nr   rw  r2   ro   s   & r9   test_ascii_add_header$TestMessageAPI.test_ascii_add_header  s<    i,l ) 	 	+9%&	(r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  rr     Fußballer.pptrt  z/attachment; filename*=utf-8''Fu%C3%9Fballer.pptNr
  ro   s   & r9   test_noascii_add_header&TestMessageAPI.test_noascii_add_header  s<    i,l% 	 	'?%&	(r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  rr  rt  z1attachment; filename*=iso-8859-1''Fu%DFballer.pptN)r>   r+   r  r
  ro   s   & r9   #test_nonascii_add_header_via_triple2TestMessageAPI.test_nonascii_add_header_via_triple  s<    i,l9 	 	;A%&	(r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  rr  zwindows [filename].pptrt  z-attachment; filename="windows [filename].ppt"Nr
  ro   s   & r9   #test_ascii_add_header_with_tspecial2TestMessageAPI.test_ascii_add_header_with_tspecial  s<    i,l- 	 	/;%&	(r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  rr  u   Fußballer [filename].pptrt  z@attachment; filename*=utf-8''Fu%C3%9Fballer%20%5Bfilename%5D.pptNr
  ro   s   & r9   &test_nonascii_add_header_with_tspecial5TestMessageAPI.test_nonascii_add_header_with_tspecial  s<    i,l0 	 	2N%&	(r<   c           	        . ROp\         P                  P                  \         P                  P                  3 FG  p\        P
                  \        P                  3 F   pV F  w  rEV P                  W#WE4       K  	  K"  	  KI  	  R# )Invalid HeaderN))r  zcontains space)z
Tab	Headerzcontains tab)zColon:Headerzcontains colon)r+   z
Empty name)z LeadingSpacezstarts with space)zTrailingSpace zends with space)zHeaderzNon-ASCII character)u   HeaderzExtended ASCII)r   r   defaultcompat32r   __setitem__rw  do_test_invalid_header_names)r6   invalid_headersr   setterrJ  r   s   &     r9   test_invalid_header_names(TestMessageAPI.test_invalid_header_names  sj    	
 ||++U\\-B-BCF"..0B0BC#2KD55t4 $3 D Dr<   c           	     f   V P                  WW4R 7      ;_uu_ 4        \        VR7      pRpV P                  \        V4      ;_uu_ 4       pV! WSV4       RRR4       V P	                  V: \        XP                  4      4       RRR4       R#   + '       g   i     LA; i  + '       g   i     R# ; i))r   r!  rJ  r   r   z'(?i)(?=.*invalid)(?=.*header)(?=.*name)N)subTestr   rt   r  r   r   	exception)r6   r   r!  rJ  r   r  patterncms   &&&&&   r9   r  +TestMessageAPI.do_test_invalid_header_names  s    \\T\OOV,G@G''
G<<u- =MMTHs2<<'89 PO =< POOs#   -B	
B	/BBBB0	c                    R FY  p\        4       pRV,          VR&   RVR&   VP                  R4       V P                  VP                  RR7      RR	V,          4       K[  	  R
# )latin-1text/plain; charset=%srA   rD   rC   s   foo=e6=96=87barTr\   	   foo文bar1get_payload returns wrong result with charset %s.Nr+  r   rn   r6   rB   r8   s   &  r9   test_binary_quopri_payload)TestMessageAPI.test_binary_quopri_payload  sb    +G)C":W"DC/AC+,OO./t,%CgMO ,r<   c                    R FY  p\        4       pRV,          VR&   RVR&   VP                  R4       V P                  VP                  RR7      RR	V,          4       K[  	  R
# )r+  r,  rA   r[   rC   s   Zm9v5paHYmFyTr\   r-  r.  Nr/  rn   r0  s   &  r9   test_binary_base64_payload)TestMessageAPI.test_binary_base64_payload  sa    +G)C":W"DC/7C+,OOO,t,%CgMO ,r<   c           
         R	 Fr  pR
 Fi  p\        4       pRV,          VR&   W#R&   VP                  R4       V P                  VP                  RR7      R\	        R4      P                  W4      4       Kk  	  Kt  	  R# )r+  r,  rA   rC   s    begin 666 -
)9F]OYI:'8F%R
 
end
Tr\   r-  Nr/  r   )z!get_payload returns wrong result z"with charset {0} and encoding {1}.)r   rU   r2   r^   r   format)r6   rB   r   r8   s   &   r9   test_binary_uuencode_payload+TestMessageAPI.test_binary_uuencode_payload  sz    +GFi&>&HN#3;/0 GH  OO4O0) ? @w13 G ,r<   c                t    \        4       pVP                  R RRR7       V P                  RVR ,          4       R# )rq  r  N)foo_barzinline; foo-barr
  ro   s   & r9   $test_add_header_with_name_only_param3TestMessageAPI.test_add_header_with_name_only_param*  s3    i,hE*C0E,FGr<   c                p    \        4       pVP                  R R4       V P                  RVR ,          4       R# )zX-StatusNr+   r
  ro   s   & r9   test_add_header_with_no_value,TestMessageAPI.test_add_header_with_no_value/  s+    iz4(S_-r<   c                    \        4       p\        R 4      VR&   V P                  \        P                  VP
                  4       R# zdummy
X-Injected-Header: testDummyN)r   r   r   r    r   r   ro   s   & r9   (test_embedded_header_via_Header_rejected7TestMessageAPI.test_embedded_header_via_Header_rejected6  s2    i>?G&113==Ar<   c                x    \        4       pR VR&   V P                  \        P                  VP                  4       R# rB  )r   r   r    r   r   ro   s   & r9   (test_embedded_header_via_string_rejected7TestMessageAPI.test_embedded_header_via_string_rejected;  s,    i7G&113==Ar<   c                    \        R 4      pRVR&   V P                  \        V4      \        P                  ! R4      4       R# )zabc
u   É testSubjectz            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Subject: =?utf-8?q?=C3=89_test?=

            abc
            Nr   r2   r   r   r   r6   r   s   & r9   -test_unicode_header_defaults_to_utf8_encoding<TestMessageAPI.test_unicode_header_defaults_to_utf8_encoding@  s9    W )Q 1 ! 	r<   c                z    \        R 4      pV P                  \        V4      \        P                  ! R4      4       R# )u   É testabc
z            Content-Type: text/plain; charset="utf-8"
            MIME-Version: 1.0
            Content-Transfer-Encoding: base64

            w4kgdGVzdGFiYwo=
            NrK  rL  s   & r9   +test_unicode_body_defaults_to_utf8_encoding:TestMessageAPI.test_unicode_body_defaults_to_utf8_encodingM  s0    ^$Q 1 ! 	r<   c                   \         P                  ! \        P                  ! R 4      \         P                  P
                  R7      pV P                  VP                  RR7      R4       V P                  VR,          P                  . 4       R# )zP        Content-Transfer-Encoding: base64

        SGVsbG8uIFRlc3Rpbmc=
        r   Tr\      Hello. TestingrC   N
r   r  r   r   r   r  r2   r^   assertDefectsEqualr  ro   s   & r9   #test_string_payload_with_base64_cte2TestMessageAPI.test_string_payload_with_base64_cteX  sk    '' 9 ) \\))	+
 	57HI$? @ H H"Mr<    N)a__name__
__module____qualname____firstlineno__r:   rM   rR   rV   ra   rg   rj   rp   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r   r#  r(  r,  r0  r=  rB  rG  rK  rP  rS  rY  rb  rn  rx  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r  r1  r4  r8  r<  r?  rD  rG  rM  rP  rV  __static_attributes____classdictcell____classdict__s   @r9   r.   r.   9   s    ,A4BH:==0
4;"	5.+8,C
2	2@,	19
!314,446132.31
3:"J
;$M
0A)F"'"C9
?	AL?C
+
+
??=@
OO===>
MM===
=
M"	B
D	9:(((((4":	O	O3H
.B
B
	N Nr<   r.   c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestEncodersid  c           
        \        R R4      ;_uu_ 4       pVP                  4       pRRR4       \        P                  P                  P                  X4      pVP                  4       pVP                  R4      pT P                  \        V Uu. uF  p\        V4      NK  	  up4      ^L4       R#   + '       g   i     L; iu upi )
python.gifrbNr*   )r'   r   r   mimeimager   r^   r   assertLessEqualmaxlen)r6   r   bindatamimedbase64edr   r  s   &      r9   test_EncodersEncode_base64'TestEncoders.test_EncodersEncode_base64f  s    lD))RggiG *

  **73$$&t$S5!:5a3q65!:;R@ *) ";s   B.C.B>	c                t    V P                   p\        4       pVP                  R 4       V! VR,          R4       R# )rP   rC   7bitN)r2   r   rH   r5   s   &  r9   test_encode_empty_payload&TestEncoders.test_encode_empty_payloado  s0    i
#
3*+V4r<   c                    V P                   p\        R 4      pV! VR,          R4       \        R4      pV! VR,          R4       \        RRR7      pV! VR,          R4       R# )	hello worldrC   rq  u   hello ø worldr[   r>   _charsetrD   N)r2   r   r5   s   &  r9   test_default_cteTestEncoders.test_default_cteu  s`    }%
3*+V4)*
3*+X6)LA
3*+-?@r<   c                    V P                   p\        R RR7      pV! VR,          R4       V! VP                  4       \        P                  ! R4      4       R# )u   文
euc-jprv  rC   rq  z            MIME-Version: 1.0
            Content-Type: text/plain; charset="iso-2022-jp"
            Content-Transfer-Encoding: 7bit

            $BJ8(B
            N)r2   r   r   r   r   r5   s   &  r9   test_encode7or8bitTestEncoders.test_encode7or8bit  sK     w2
3*+V4
3==?HOO -  	r<   c                ~    \        R RR4      pV P                  \        V4      \        P                  ! R4      4       R# )u   áö
r   z
ISO-8859-1z            MIME-Version: 1.0
            Content-Type: text/text; charset="iso-8859-1"
            Content-Transfer-Encoding: quoted-printable

            =E1=F6
            NrK  ro   s   & r9   test_qp_encode_latin1"TestEncoders.test_qp_encode_latin1  s4    |V\:S8?? 4 $ 	r<   c                ~    \        R RR4      pV P                  \        V4      \        P                  ! R4      4       R# )u   ż
r   z
ISO-8859-2z            MIME-Version: 1.0
            Content-Type: text/text; charset="iso-8859-2"
            Content-Transfer-Encoding: quoted-printable

            =BF
            NrK  ro   s   & r9   test_qp_encode_non_latin1&TestEncoders.test_qp_encode_non_latin1  s4    z6<8S8?? 4 $ 	r<   rX  N)rY  rZ  r[  r\  rn  rr  rx  r|  r  r  r]  r^  r_  s   @r9   rb  rb  d  s*     A5
A	 	r<   rb  c                     a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R# t%R$ t&R% t'R& t(R' t)R( t*R) t+R*t,V t-R# )+TestLongHeadersi  Nc                    V P                   p\        P                  ! R 4      p\        4       p\	        V4      pVP                  V4       V! VP                  4       R 4       R# )zSubject: bug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more text

test
N)ndiffAssertEqualr   r  r   r   r   r   r6   r7   r8   sfpr   s   &    r9   test_split_long_continuation,TestLongHeaders.test_split_long_continuation  sT    ""'' )  jcN			#
3<<>  	r<   c                    V P                   pR p\        VRR7      pV! VP                  4       R 4       \        VP                  RR4      4      pV! VP                  4       R4       R# )zbug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more text	continuation_wsr,   zbug demonstration
 12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
 more textN)r  r   r   r  r6   r7   hstrhs   &   r9   ,test_another_long_almost_unsplittable_header<TestLongHeaders.test_another_long_almost_unsplittable_header  sc    "" 4.
188:  	 4<<c*+
188:  	r<   c                   V P                   p\        R 4      p\        R4      p\        R4      pRpRpRp\        WRRR7      pVP                  Wc4       VP                  Wt4       \	        4       p	WR&   \        4       p
\        V
4      pVP                  V	4       V! V
P                  4       R4       V! VP                  ^LR	7      R
4       R# )r>   r|   rZ      Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an sdlndischen Wandgemlden vorbei, gegen die rotierenden Klingen befrdert. ;   Finanni metropole se hroutily pod tlakem jejich dvtipu..    正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.」と言っています。rJ  header_namea!  Subject: =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerderb?=
 =?iso-8859-1?q?and_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndischen?=
 =?iso-8859-1?q?_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Klingen_bef?=
 =?iso-8859-1?q?=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se_hrouti?=
 =?iso-8859-2?q?ly_pod_tlakem_jejich_d=F9vtipu=2E=2E_?= =?utf-8?b?5q2j56K6?=
 =?utf-8?b?44Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb44KT44CC5LiA?=
 =?utf-8?b?6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go44Gv44Gn44Gf44KJ?=
 =?utf-8?b?44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBpc3QgZGFzIE51bnN0dWNr?=
 =?utf-8?b?IGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWloZXJodW5kIGRhcyBPZGVyIGRp?=
 =?utf-8?b?ZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI3jgajoqIDjgaPjgabjgYTjgb7jgZk=?=
 =?utf-8?b?44CC?=


maxlinelena	  =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerde?=
 =?iso-8859-1?q?rband_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndis?=
 =?iso-8859-1?q?chen_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Klinge?=
 =?iso-8859-1?q?n_bef=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se?=
 =?iso-8859-2?q?_hroutily_pod_tlakem_jejich_d=F9vtipu=2E=2E_?=
 =?utf-8?b?5q2j56K644Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb?=
 =?utf-8?b?44KT44CC5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go?=
 =?utf-8?b?44Gv44Gn44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBp?=
 =?utf-8?b?c3QgZGFzIE51bnN0dWNrIGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWlo?=
 =?utf-8?b?ZXJodW5kIGRhcyBPZGVyIGRpZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI0=?=
 =?utf-8?b?44Go6KiA44Gj44Gm44GE44G+44GZ44CC?=N)
r  r
   r   appendr   r   r   r   r   r   )r6   r7   r   czutf8g_headcz_head	utf8_headr  r8   r  s   &          r9   test_long_nonstring#TestLongHeaders.test_long_nonstring  s    ""L!\"w$$0	 6)4		!iIjcN			#
3<<>  	 	188r8" %1 	2r<   c                f    V P                   p\        R RR7      pV! VP                  4       R4       R# )iwasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"X-Foobar-Spoink-Defrobnitr  jwasnipoop; giraffes="very-long-necked-animals";
 spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"Nr  r   r   r6   r7   r  s   &  r9   test_long_header_encode'TestLongHeaders.test_long_header_encode  s7    "" O:< 	188: > 	?r<   c                h    V P                   p\        R RRR7      pV! VP                  4       R4       R# )r  r  r  r  r  r  Nr  r  s   &  r9   <test_long_header_encode_with_tab_continuation_is_just_a_hintLTestLongHeaders.test_long_header_encode_with_tab_continuation_is_just_a_hint  s:    "" O:#') 	188: > 	?r<   c                h    V P                   p\        R RRR7      pV! VP                  4       R4       R# )ziwasnipoop; giraffes="very-long-necked-animals";	spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"r  r  r  zjwasnipoop; giraffes="very-long-necked-animals";
	spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"Nr  r  s   &  r9   -test_long_header_encode_with_tab_continuation=TestLongHeaders.test_long_header_encode_with_tab_continuation  s;    "" O:#') 	188: ? 	@r<   c                ^    \        R R4      pV P                  VP                  4       R4       R# )   文r{  =?iso-2022-jp?b?GyRCSjgbKEI=?=Nr   r2   r   r6   r  s   & r9   0test_header_encode_with_different_output_charset@TestLongHeaders.test_header_encode_with_different_output_charset#  s%    5(#%EFr<   c                    \        R P                  R4      R4      pRpV P                  VP                  4       V4       R# )s6   test-ja Ƥ줿᡼ϻʲԤξǧԤäƤޤr{  z=?iso-2022-jp?b?dGVzdC1qYSAbJEIkWEVqOUYkNSRsJD8lYSE8JWskTztKMnE8VCROPjUbKEI=?=
 =?iso-2022-jp?b?GyRCRyckckJUJEMkRiQkJF4kORsoQg==?=N)r   r]   r2   r   )r6   r  ress   &  r9   5test_long_header_encode_with_different_output_charsetETestLongHeaders.test_long_header_encode_with_different_output_charset'  s?     $ %+F8$4h@7 	S)r<   c                    V P                   p\        R 4      pRVR&   \        4       p\        V4      pVP	                  V4       V! VP                  4       R4       R# )r+   r  r  zContent-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Foobar-Spoink-Defrobnit: wasnipoop; giraffes="very-long-necked-animals";
 spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"

N)r  r   r   r   r   r   r  s   &    r9   test_header_splitter$TestLongHeaders.test_header_splitter1  sY    ""rlH 	'( jcN			#
3<<>  	r<   c                (   V P                   p\        4       pR VR&   \        P                  R \	        ^
4       4       4      VR&   VP                  R4       \        4       p\        V4      pVP                  V4       V! VP                  4       R4       R# )test@dom.ainr   c              3   4   "   T F  pR V,          x  K  	  R# 5i)z<%d@dom.ain>NrX  ).0is   & r9   	<genexpr>@TestLongHeaders.test_no_semis_header_splitter.<locals>.<genexpr>I  s     &M9a~'9'99s   
ReferencesTestzFrom: test@dom.ain
References: <0@dom.ain> <1@dom.ain> <2@dom.ain> <3@dom.ain> <4@dom.ain>
 <5@dom.ain> <6@dom.ain> <7@dom.ain> <8@dom.ain> <9@dom.ain>

TestN)
r  r   SPACEr   rangerU   r   r   r   r   r  s   &    r9   test_no_semis_header_splitter-TestLongHeaders.test_no_semis_header_splitterE  sv    ""i$F!JJ&M59&MMLjcN			#
3<<>  		r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zSubject: the first part of this is short, but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfzSubject: the first part of this is short,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfNr  r  s   &  r9   "test_last_split_chunk_does_not_fit2TestLongHeaders.test_last_split_chunk_does_not_fitU  5    ""   	188: b 	cr<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )z_, but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfz`,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfNr  r  s   &  r9   >test_splittable_leading_char_followed_by_overlong_unsplittableNTestLongHeaders.test_splittable_leading_char_followed_by_overlong_unsplittable^  r  r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )za, , but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfzb, ,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfNr  r  s   &  r9   Gtest_multiple_splittable_leading_char_followed_by_overlong_unsplittableWTestLongHeaders.test_multiple_splittable_leading_char_followed_by_overlong_unsplittableg  r  r<   c                b    V P                   p\        R 4      pV! VP                  4       R 4       R# )zTthis_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;Nr  r  s   &  r9   1test_trailing_splittable_on_overlong_unsplittableATestLongHeaders.test_trailing_splittable_on_overlong_unsplittablep  s1    "" * +
188: * 	+r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zW; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; zX;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; Nr  r  s   &  r9   Itest_trailing_splittable_on_overlong_unsplittable_with_leading_splittableYTestLongHeaders.test_trailing_splittable_on_overlong_unsplittable_with_leading_splittablew  s5    "" + , 	188: Z 	[r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zpThis is a long line that has two whitespaces  in a row.  This used to cause truncation of the header when foldedzqThis is a long line that has two whitespaces  in a row.  This used to cause
 truncation of the header when foldedNr  r  s   &  r9   5test_long_header_with_multiple_sequential_split_charsETestLongHeaders.test_long_header_with_multiple_sequential_split_chars  s3    "" F G
188: ) 	*r<   c                b    V P                   p\        R 4      pV! VP                  4       R 4       R# )Kthisverylongheaderhas;semicolons;and,commas,butthey;arenotlegal;fold,pointsNr  r  s   &  r9   :test_splitter_split_on_punctuation_only_if_fws_with_headerJTestLongHeaders.test_splitter_split_on_punctuation_only_if_fws_with_header  s1    "" + ,
188: 2 	3r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zthis is a  test where we need to have more than one line before; our final line that is just too big to fit;; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;zthis is a  test where we need to have more than one line before;
 our final line that is just too big to fit;;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;Nr  r  s   &  r9   Dtest_leading_splittable_in_the_middle_just_before_overlong_last_partTTestLongHeaders.test_leading_splittable_in_the_middle_just_before_overlong_last_part  s5    "" * + 	188: Y 	Zr<   c                b    V P                   p\        R 4      pV! VP                  4       R 4       R# )zTthis_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself Nr  r  s   &  r9   /test_overlong_last_part_followed_by_split_point?TestLongHeaders.test_overlong_last_part_followed_by_split_point  s1    "" * +
188: = 	>r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zthis_is_a__test_where_we_need_to_have_more_than_one_line_before_our_final_line_; ; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; zthis_is_a__test_where_we_need_to_have_more_than_one_line_before_our_final_line_;
 ;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; Nr  r  s   &  r9   @test_multiline_with_overlong_parts_separated_by_two_split_pointsPTestLongHeaders.test_multiline_with_overlong_parts_separated_by_two_split_points  5    "" + , 	188: Z 	[r<   c                b    V P                   p\        R 4      pV! VP                  4       R4       R# )zthis is a test where we need to have more than one line before our final line; ; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; zthis is a test where we need to have more than one line before our final line;
 ;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; Nr  r  s   &  r9   >test_multiline_with_overlong_last_part_followed_by_split_pointNTestLongHeaders.test_multiline_with_overlong_last_part_followed_by_split_point  r  r<   c                   V P                   p\        4       pR VR&   \        P                  R.^
,          4      VR&   VP	                  R4       \        4       p\        V4      pVP                  V4       V! VP                  4       R4       R# )r  r   z<foo@dom.ain>  r  r  zFrom: test@dom.ain
References: <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>
   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>
   <foo@dom.ain>   <foo@dom.ain>  

TestN	r  r   r  r   rU   r   r   r   r   r  s   &    r9   %test_long_header_with_whitespace_runs5TestLongHeaders.test_long_header_with_whitespace_runs  su    ""i$F!JJ(9':R'?@LjcN			#
3<<>  		r<   c                &   V P                   p\        4       pR VR&   \        P                  R.^
,          4      R,           VR&   VP	                  R4       \        4       p\        V4      pVP                  V4       V! VP                  4       R4       R# )r  r   z<foo@dom.ain>z; abcr  r  zFrom: test@dom.ain
References: <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain>
 <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain>
 <foo@dom.ain>; abc

TestNr  r  s   &    r9   'test_long_run_with_semi_header_splitter7TestLongHeaders.test_long_run_with_semi_header_splitter  sy    ""i$F!JJ'82'=>HLjcN			#
3<<>  		r<   c                    V P                   p\        4       pR VR&   RVR&   VP                  R4       \        4       p\	        V4      pVP                  V4       V! VP                  4       R4       R# )r  r   r  r  r  zrFrom: test@dom.ain
References: 
 thisverylongheaderhas;semicolons;and,commas,butthey;arenotlegal;fold,points

TestN)r  r   rU   r   r   r   r   r  s   &    r9   .test_splitter_split_on_punctuation_only_if_fws>TestLongHeaders.test_splitter_split_on_punctuation_only_if_fws  se    ""i$F+LjcN			#
3<<>  		r<   c                    V P                   pRp\        V4      pV! VP                  4       R4       \        R4      pV! VP                  4       R4       R# )zReferences: z]References:
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxNz\References: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr  r  s   &   r9   test_no_split_long_header)TestLongHeaders.test_no_split_long_header  sQ    ""(4L 	188: U 	V 8
188:ijr<   c                j    V P                   pR p\        VRR7      pV! VP                  4       R4       R# )aW  from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
r  r  a_  from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)Nr  r  s   &   r9   "test_splitting_multiple_long_lines2TestLongHeaders.test_splitting_multiple_long_lines  s7    ""
 4.
188: ) 	*r<   c                n    V P                   pR p\        V^NRRR7      pV! VP                  4       R4       R# )zfrom modemcable093.139-201-24.que.mc.videotron.ca ([24.201.139.93] helo=cthulhu.gerg.ca)
	by kronos.mems-exchange.org with esmtp (Exim 4.05)
	id 17k4h5-00034i-00
	for test@mems-exchange.org; Wed, 28 Aug 2002 11:25:20 -0400Receivedr  )r  r  r  zfrom modemcable093.139-201-24.que.mc.videotron.ca ([24.201.139.93]
 helo=cthulhu.gerg.ca)
	by kronos.mems-exchange.org with esmtp (Exim 4.05)
	id 17k4h5-00034i-00
	for test@mems-exchange.org; Wed, 28 Aug 2002 11:25:20 -0400Nr  r  s   &   r9   &test_splitting_first_line_only_is_long6TestLongHeaders.test_splitting_first_line_only_is_long  sA    ""A
 4BJ#')
188: A 	Br<   c                   V P                   p\        4       p\        R RRR7      pVP                  R4       V! VP	                  ^LR7      R4       W2R&   V! VP                  ^LR7      R4       V! VP                  ^ R7      R	4       R
# )zBritische Regierung gibtr>   rJ  r  u-   grünes Licht für Offshore-Windkraftprojekter  zl=?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offs?=
 =?iso-8859-1?q?hore-Windkraftprojekte?=maxheaderlenzwSubject: =?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offs?=
 =?iso-8859-1?q?hore-Windkraftprojekte?=

zdSubject: =?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offshore-Windkraftprojekte?=

N)r  r   r   r  r   r   )r6   r7   r8   r  s   &   r9   test_long_8bit_header%TestLongHeaders.test_long_8bit_header  s    ""i-| )+	DE
188r8" %, 	- I
3==b=) , 	
 	3==a=( + 	r<   c                    V P                   p\        4       pR pW2R&   V! VP                  ^NR7      R4       \        4       p\        VRR7      VR&   V! VP                  ^NR7      R4       R# )uh   Britische Regierung gibt grünes Licht für Offshore-Windkraftprojekte <a-very-long-address@example.com>zReply-Tor	  zReply-To: =?utf-8?q?Britische_Regierung_gibt_gr=C3=BCnes_Licht_f=C3=BCr_Offs?=
 =?utf-8?q?hore-Windkraftprojekte_=3Ca-very-long-address=40example=2Ecom=3E?=

r  N)r  r   r   r   )r6   r7   r8   header_strings   &   r9    test_long_8bit_header_no_charset0TestLongHeaders.test_long_8bit_header_no_charset1  st    ""i= (J
3==b=) , 	
 i -79J
3==b=) , 	r<   c                p    V P                   pR p\        4       pW#R&   V! VP                  ^NR7      R4       R# )z"Someone Test #A" <someone@eecs.umich.edu>,<someone@eecs.umich.edu>, "Someone Test #B" <someone@umich.edu>, "Someone Test #C" <someone@eecs.umich.edu>, "Someone Test #D" <someone@eecs.umich.edu>r   r	  zTo: "Someone Test #A" <someone@eecs.umich.edu>,<someone@eecs.umich.edu>,
 "Someone Test #B" <someone@umich.edu>,
 "Someone Test #C" <someone@eecs.umich.edu>,
 "Someone Test #D" <someone@eecs.umich.edu>

N)r  r   r   )r6   r7   r   r8   s   &   r9   test_long_to_header#TestLongHeaders.test_long_to_headerF  s>    "";
 iD	
3==b=) , 	r<   c                    V P                   pR p\        V4      pVP                  R4       V! VP                  ^LR7      R4       R# )zIThis is an example of string which has almost the limit of header length.zAdd another line.r  z\This is an example of string which has almost the limit of header length.
 Add another line.Nr  r   r  r   r6   r7   r   r  s   &   r9   test_long_line_after_append+TestLongHeaders.test_long_line_after_appendW  sB    ""W1I	$%
188r8" % 	r<   c                    V P                   pR p\        V4      pVP                  R4       V! VP                  4       R4       R# )zThis is a shorter line.z!Add another sentence. (Surprise?)z9This is a shorter line. Add another sentence. (Surprise?)Nr  r  s   &   r9   test_shorter_line_with_append-TestLongHeaders.test_shorter_line_with_append`  s<    ""%1I	45
188:F	Hr<   c                t    V P                   pR pRp\        VRVR7      pV! VP                  ^LR7      R4       R# )z!X-Very-Very-Very-Long-Header-Nameu   Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an südlündischen Wandgemälden vorbei, gegen die rotierenden Klingen befördert. r>   r  r  a  =?iso-8859-1?q?Die_Mieter_treten_hier_e?=
 =?iso-8859-1?q?in_werden_mit_einem_Foerderband_komfortabel_den_Korridor_e?=
 =?iso-8859-1?q?ntlang=2C_an_s=FCdl=FCndischen_Wandgem=E4lden_vorbei=2C_ge?=
 =?iso-8859-1?q?gen_die_rotierenden_Klingen_bef=F6rdert=2E_?=Nr  )r6   r7   fngsr  s   &    r9   test_long_field_name$TestLongHeaders.test_long_field_nameh  sE    ""0 2|4
188r8" %A 	Br<   c                    R p\        4       p\        VRR7      VR&   WR&   V P                  VP                  ^NR7      R4       R# )zfrom FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP; Wed, 05 Mar 2003 18:10:18 -0700r  r  
Received-1
Received-2r	  a1  Received-1: from FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by
 hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP;
 Wed, 05 Mar 2003 18:10:18 -0700
Received-2: from FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by
 hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP;
 Wed, 05 Mar 2003 18:10:18 -0700

Nr   r   r  r   r6   r  r8   s   &  r9   test_long_received_header)TestLongHeaders.test_long_received_headerw  sK    / i"1d;LLcmmm< ? 	r<   c                    R p\        4       p\        VRRR7      VR&   WR&   V P                  VP                  ^NR7      R4       R# )z<15975.17901.207240.414604@sgigritzmann1.mathematik.tu-muenchen.de> (David Bremner's message of "Thu, 6 Mar 2003 13:58:21 +0100")r"  r  r  r#  r	  a#  Received-1: 
 <15975.17901.207240.414604@sgigritzmann1.mathematik.tu-muenchen.de> (David
 Bremner's message of "Thu, 6 Mar 2003 13:58:21 +0100")
Received-2: 
 <15975.17901.207240.414604@sgigritzmann1.mathematik.tu-muenchen.de> (David
 Bremner's message of "Thu, 6 Mar 2003 13:58:21 +0100")

Nr$  r%  s   &  r9   test_string_headerinst_eq)TestLongHeaders.test_string_headerinst_eq  sP    1 i"1,379LLcmmm< ? 	r<   c                    V P                   p\        4       pR pW2R&   \        VRR7      VR&   RV,           VR&   V! VP                  ^NR7      R4       R# )	ziVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzpzFace-1zFace-2r  r,   zFace-3r	  a  Face-1: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp
Face-2: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp
Face-3: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp

Nr  r   r   r   )r6   r7   r8   ts   &   r9   -test_long_unbreakable_lines_with_continuation=TestLongHeaders.test_long_unbreakable_lines_with_continuation  s^    ""iM Hqh7HaH 	3==b=) , 	r<   c                    V P                   pR p\        P                  ! V4      pV! VP                  ^NR7      R4       R# )zReceived: from siimage.com ([172.25.1.3]) by zima.siliconimage.com with Microsoft SMTPSVC(5.0.2195.4905); Wed, 16 Oct 2002 07:41:11 -0700r	  zReceived: from siimage.com ([172.25.1.3]) by zima.siliconimage.com with
 Microsoft SMTPSVC(5.0.2195.4905); Wed, 16 Oct 2002 07:41:11 -0700

N)r  r   r  r   r6   r7   r   r8   s   &   r9   "test_another_long_multiline_header2TestLongHeaders.test_another_long_multiline_header  s@    ""/ ''*
3==b=) , 	r<   c                    V P                   pR p\        4       pW#R&   \        VRR7      VR&   V! VP                  ^NR7      R4       R# )zList-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>Listr  r	  a_  List: List-Unsubscribe:
 <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>
List: List-Unsubscribe:
 <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>

Nr,  )r6   r7   r  r8   s   &   r9   %test_long_lines_with_different_header5TestLongHeaders.test_long_lines_with_different_header  sN    ""% iFQF3F
3==b=) , 	r<   c                    \        \        P                  ! R 4      RRR7      pV P                  VP	                  4       R,           \        P                  ! R4      R,           4       R# )z            We're going to pretend this header is in a non-ascii character set
            	to see if line wrapping with encoded words and embedded
               folding white space worksrZ   r  )rB   r  r*   z            =?utf-8?q?We=27re_going_to_pretend_this_header_is_in_a_non-ascii_chara?=
             =?utf-8?q?cter_set?=
             =?utf-8?q?_to_see_if_line_wrapping_with_encoded_words_and_embedded?=
             =?utf-8?q?_folding_white_space_works?=N)r   r   r   r2   r   r  s   & r9   *test_long_rfc2047_header_with_embedded_fws:TestLongHeaders.test_long_rfc2047_header_with_embedded_fws  sZ    8?? $, - #%' 	D(// ;7 +8 9=	+= 	>r<   rX  ).rY  rZ  r[  r\  maxDiffr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r)  r.  r2  r6  r9  r]  r^  r_  s   @r9   r  r    s     G("42l??@G*(	 ccc+[*3	Z>	[	[	"	"	$
k*,B (*"HB$&0&> >r<   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestFromManglingi  c                x    \        4       V n        R V P                  R&   V P                  P                  R4       R# )zaaa@bbb.orgr   z(From the desk of A.A.A.:
Blah blah blah
N)r   r8   rU   r6   s   &r9   setUpTestFromMangling.setUp  s0    9(  	r<   c                    \        4       p\        VR R7      pVP                  V P                  4       V P	                  VP                  4       R4       R# )Tmangle_from_z<From: aaa@bbb.org

>From the desk of A.A.A.:
Blah blah blah
Nr   r   r   r8   r2   r   r6   r   r   s   &  r9   test_mangled_from"TestFromMangling.test_mangled_from  s@    Jad+			$(( ( 	r<   c                    \        4       p\        VR R7      pVP                  V P                  4       V P	                  VP                  4       R4       R# )FrC  z;From: aaa@bbb.org

From the desk of A.A.A.:
Blah blah blah
NrE  rF  s   &  r9   test_dont_mangle_from&TestFromMangling.test_dont_mangle_from  s@    Jae,			$(( ( 	r<   c           
     v   \        4       p\        VR R7      p\        P                  ! \        P
                  ! R4      4      pVP                  V4       T P                  \        VP                  4       P                  R4       Uu. uF  pVP                  R4      '       g   K  ^NK   	  up4      ^4       R# u upi )TrC  a)              From: foo@bar.com
            Mime-Version: 1.0
            Content-Type: multipart/mixed; boundary=XXX

            From somewhere unknown

            --XXX
            Content-Type: text/plain

            foo

            --XXX--

            From somewhere unknowable
            r*   z>From N)r   r   r   r  r   r   r   r2   rj  r   r   
startswith)r6   r   r   r8   r  s   &    r9   'test_mangle_from_in_preamble_and_epilog8TestFromMangling.test_mangle_from_in_preamble_and_epilog  s    Jad+'' 9 )   	
		#););D)A =)AA%&\\(%;  a)A = >?@	B =s   B6"B6c                (   \         P                  ! R 4      P                  R4      p\        P                  ! VR,           4      p\        4       p\        VRR7      pVP                  V4       V P                  VP                  4       VR,           4       R# )z            Content-Type: text/plain; charset="utf-8"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 8bit
            From: aaa@bbb.org

        rZ   s   From Rölli
TrC  s   >From Rölli
N)
r   r   r   r   r   r   r   r   r2   r   )r6   r  r8   br   s   &    r9    test_mangled_from_with_bad_bytes1TestFromMangling.test_mangled_from_with_bad_bytes  su     "  VG_ 	 &&v0F'FGI140			#v0G'GHr<   c                |    \         P                  ! R 4      P                  R4      p\        P                  ! V4      pR# )u               From: aperson@example.com
            Content-Type: multipart/mixed; boundary="1"
            Content-Transfer-Encoding: È
        rZ   N)r   r   r   r   r   )r6   r  r8   s   &  r9   $test_multipart_with_bad_bytes_in_cte5TestFromMangling.test_multipart_with_bad_bytes_in_cte(  s5     "  VG_	 	
 &&v.r<   )r8   N)rY  rZ  r[  r\  r@  rG  rJ  rN  rR  rU  r]  r^  r_  s   @r9   r=  r=    s*     		B.I/ /r<   r=  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestMIMEAudioi3  c                    \        R V 2R4      ;_uu_ 4       pVP                  4       V n        RRR4       \        V P                  4      V n        R#   + '       g   i     L,; i)zsndhdr.re  N)r'   r   
_audiodatar   _aur6   extr   s   && r9   _make_audioTestMIMEAudio._make_audio4  sB    uot,, ggiDO -T__- -,   AA"	c                    R RRRRRRR/P                  4        FK  w  rV P                  V4       Vf   TMTpV P                  V P                  P	                  4       RV 24       KM  	  R# )	aifczx-aiffaiffwavzx-wavaubasicNzaudio/)r   r^  r2   r[  rI   r6   r]  subtypes   &  r9   test_guess_minor_type#TestMIMEAudio.test_guess_minor_type9  sq    HH7'	

 %'LC S!$_c'GTXX668F7):LMr<   c                    V P                  R 4       V P                  P                  4       pV P                  \        P
                  ! \        VR4      4      V P                  4       R# )re  r   N)r^  r[  r^   r2   r[   decodebytesr  rZ  r6   payloads   & r9   test_encodingTestMIMEAudio.test_encodingD  sK    ((&&(++E'7,CD	*r<   c                    V P                  R 4       \        V P                  R4      pV P                  VP	                  4       R4       R# )re  fishz
audio/fishN)r^  r   rZ  r2   rI   )r6   re  s   & r9   test_checkSetMinor TestMIMEAudio.test_checkSetMinorJ  s9    t/,,.=r<   c                   V P                  R 4       V P                  pV P                  P                  RRRR7       V! V P                  R,          R4       V! V P                  P	                  RR7      RR.4       V! V P                  P                  R	RR7      R4       . pV! V P                  P                  RRR7      R4       V P                  V P                  P                  R
VRR7      V4       V P                  V P                  P                  RV4      V4       V P                  V P                  P                  RVRR7      V4       R# )re  rq  rr  	sndhdr.aurt  ru  z attachment; filename="sndhdr.au"r5  r+   r  r   failobjr   r  Nrr  r+   )r  rv  )r^  r2   r[  rw  r<  rJ   assertIsr6   r7   missings   &  r9   test_add_headerTestMIMEAudio.test_add_headerO  s8   1<%0 	 	2
488)*-	/
488&;< 9:	<
488j1FG	
488l3HI2Ndhh((7( ) *+2	4 	dhh((7;WEdhh((w08 ) :;B	Dr<   )r[  rZ  N)rY  rZ  r[  r\  r^  ri  ro  rs  r}  r]  r^  r_  s   @r9   rX  rX  3  s&     .
	N*>
D Dr<   rX  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestMIMEImageig  c                    \        R V 2R4      ;_uu_ 4       pVP                  4       V n        RRR4       \        V P                  4      V n        R#   + '       g   i     L,; i)zpython.re  N)r'   r   _imgdatar   _imr\  s   && r9   _make_imageTestMIMEImage._make_imageh  sB    uot,,GGIDM -T]]+ -,r`  c                    R RRRRRRRRRRRRRR	RR
RRRRRRRRR/P                  4        FK  w  rV P                  V4       Vf   TMTpV P                  V P                  P	                  4       RV 24       KM  	  R# )bmpNexrgifjpgjpegpbmpgmpngppmrasrastsgirgbtiffwebpxbmzimage/)r   r  r2   r  rI   rg  s   &  r9   ri  #TestMIMEImage.test_guess_minor_typem  s    4446444465DD4
 %'LC S!$_c'GTXX668F7):LM#r<   c                    V P                  R 4       V P                  P                  4       pV P                  \        P
                  ! \        VR4      4      V P                  4       R# )r  r   N)r  r  r^   r2   r[   rl  r  r  rm  s   & r9   ro  TestMIMEImage.test_encoding  sK    ((&&(++E'7,CD	(r<   c                    V P                  R 4       \        V P                  R4      pV P                  VP	                  4       R4       R# )r  rr  z
image/fishN)r  r   r  r2   rI   )r6   ims   & r9   rs   TestMIMEImage.test_checkSetMinor  s9    t}}f-,,.=r<   c                   V P                  R 4       V P                  pV P                  P                  RRRR7       V! V P                  R,          R4       V! V P                  P	                  RR7      RR.4       V! V P                  P                  R	RR7      R4       . pV! V P                  P                  RRR7      R4       V P                  V P                  P                  R
VRR7      V4       V P                  V P                  P                  RV4      V4       V P                  V P                  P                  RVRR7      V4       R# )r  rq  rr  r   rt  ru  z%attachment; filename="dingusfish.gif"r5  r+   r  r   rw  r  Nry  )r  r   )r  r2   r  rw  r<  rJ   rz  r{  s   &  r9   r}  TestMIMEImage.test_add_header  s:   1<%5 	 	7
488)*2	4
488&;< >?	A
488j1FG	
488l3HI2Ndhh((0E ) GHO	Q 	dhh((7;WEdhh((w08 ) :;B	Dr<   )r  r  N)rY  rZ  r[  r\  r  ri  ro  rs  r}  r]  r^  r_  s   @r9   r  r  g  s&     ,
N((>
D Dr<   r  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestMIMEApplicationi  c                    V P                   p\        R 4      pV! VP                  4       R4       V! VR,          R4       R# )   r  rC   r[   N)r2   r   rI   r5   s   &  r9   test_headers TestMIMEApplication.test_headers  s<    9:
3!#=>
3*+X6r<   c                    V P                   pR p\        V4      pV! VP                  4       P                  4       R4       V! VP                  RR7      V4       R# )r  z+vv8/f7/Tr\   N)r2   r   r^   strip)r6   r7   	bytesdatar8   s   &   r9   	test_bodyTestMIMEApplication.test_body  sK    /	i(
3??""$j1
3??$?'3r<   c                   R p\        V\        P                  R7      pV P                  VP	                  4       R\        V4      ,          4       V P                  VP	                  RR7      V4       V P                  VR,          R4       \        4       p\        V4      pVP                  V4       VP                  4       p\        P                  ! V4      pV P                  VP	                  4       R\        V4      ,          4       V P                  VP	                  RR7      V4       V P                  VR,          R4       R# )r  _encoder   �Tr\   rF   re   N)r   r   encode_7or8bitr2   r^   rj  r   r   r   r   r   r   r6   r  r8   r   r   wireformmsg2s   &      r9   $test_binary_body_with_encode_7or8bit8TestMIMEApplication.test_binary_body_with_encode_7or8bit  s    /	i(2I2IJ*Hs9~,EF5yA896BI1			#::<''1*Hs9~,EF)))6	B9:FCr<   c                    R p\        V\        P                  R7      pV P                  VP	                  4       R\        V4      ,          4       V P                  VP	                  RR7      V4       \        4       p\        V4      pVP                  V4       VP                  4       p\        P                  ! V4      pV P                  VP	                  4       R\        V4      ,          4       V P                  VP	                  RR7      V4       R# )r  r  r  Tr\   N)r   r   encode_noopr2   r^   rj  r   r   r   r   r   r   r  s   &      r9   !test_binary_body_with_encode_noop5TestMIMEApplication.test_binary_body_with_encode_noop  s     0	i(2F2FG*Hs9~,EF5yAI1			#::<''1*Hs9~,EF)))6	Br<   c                `   R p\        V\        P                  R7      pV P                  VP	                  RR7      V4       \        4       p\        V4      pVP                  V4       VP                  4       p\        P                  ! V4      pV P                  VP	                  RR7      V4       R# )s   r  Tr\   N)r   r   r  r2   r^   r   r   r   r   r   r   r  s   &      r9   0test_binary_body_with_unicode_linend_encode_noopDTestMIMEApplication.test_binary_body_with_unicode_linend_encode_noop  s    3	i(2F2FG5yAI1			#::<''1)))6	Br<   c                D   R p\        V\        P                  R7      pV P                  VP	                  4       R4       V P                  VP	                  RR7      V4       V P                  VR,          R4       \        4       p\        V4      pVP                  V4       VP                  4       p\        P                  ! V4      pV P                  VP	                  4       R4       V P                  VP	                  RR7      V4       V P                  VR,          R4       R# )s    r  z=FA=FB=FC=FD=FE=FF=20Tr\   rF   rD   N)r   r   encode_quoprir2   r^   r   r   r   r   r   r   r  s   &      r9   #test_binary_body_with_encode_quopri7TestMIMEApplication.test_binary_body_with_encode_quopri  s    0	i(2H2HI*,CD5yA89;MNI1			#::<''1*,CD)))6	B9:<NOr<   c                   R p\        V\        P                  R7      pV P                  VP	                  4       R4       V P                  VP	                  RR7      V4       \        4       p\        V4      pVP                  V4       VP                  4       p\        P                  ! V4      pV P                  VP	                  4       R4       V P                  VP	                  RR7      V4       R# )r  r  z	+vv8/f7/
Tr\   N)r   r   encode_base64r2   r^   r   r   r   r   r   r   r  s   &      r9   #test_binary_body_with_encode_base647TestMIMEApplication.test_binary_body_with_encode_base64  s    /	i(2H2HI*L95yAI1			#::<''1*L9)))6	Br<   rX  N)rY  rZ  r[  r\  r  r  r  r  r  r  r  r]  r^  r_  s   @r9   r  r    s3     74D"C"
CP C Cr<   r  c                   z   a  ] tR tRt o R tR tR tR tR tR t	R t
]P                  ! R	4      R
 4       tRtV tR# )TestMIMETexti  c                &    \        R 4      V n        R# hello thereN)r   _msgr?  s   &r9   r@  TestMIMEText.setUp  s    ]+	r<   c                \   V P                   pV! V P                  P                  4       R 4       V! V P                  P                  R4      R4       . pV P	                  V P                  P                  RV4      V4       V P	                  V P                  P                  RVRR7      V4       R# )r@   rB   rP   r  r5  N)r2   r  rI   rJ   rz  r{  s   &  r9   
test_typesTestMIMEText.test_types  s    
499%%'6
499y):6dii))(G<gFdii)))WX)N	r<   c                    V P                  V P                  P                  4       R 4       V P                  V P                  P	                  4       4       R# r  )r2   r  r^   assertFalseis_multipartr?  s   &r9   test_payloadTestMIMEText.test_payload  s:    ..0-@//12r<   c                h   V P                   p\        R RR7      pV! VP                  4       P                  R4       V! VR,          R4       \	        R4      pRVn        \        R VR7      pV! VP                  4       P                  R4       V! VR,          R4       V! VP                  4       R 4       R# )r  rP   rv  rA   rQ   rZ   Nr  )r2   r   rG   rK   r
   rf   r^   rL   s   &   r9   test_charsetTestMIMEText.test_charset  s    }z:
3??**J7
3~ @A'" $}w7
3??**G4
3~ =>
3??m,r<   c                    V P                   p\        R RR7      pV! VP                  4       P                  R4       V! VR,          R4       R# )r  rP   rv  rA   rQ   N)r2   r   rG   rK   r5   s   &  r9   test_7bit_inputTestMIMEText.test_7bit_input  s@    }z:
3??**J7
3~ @Ar<   c                    V P                   p\        R 4      pV! VP                  4       R4       V! VR,          R4       V P                  R VP	                  4       4       R# )r  rP   rA   rQ   N)r2   r   rG   r   r   r5   s   &  r9   test_7bit_input_no_charset'TestMIMEText.test_7bit_input_no_charset"  sL    }%
3??j)
3~ @AmS]]_5r<   c                    R pV P                   p\        VRR7      pV! VP                  4       P                  R4       V! VR,          R4       V! VP	                  RR7      VP                  R4      4       R# )   кирилицаrZ   rv  rA   r  Tr\   N)r2   r   rG   output_charsetr^   r   )r6   teststrr7   r8   s   &   r9   test_utf8_inputTestMIMEText.test_utf8_input)  sc    Dw1
3??++W5
3~ =>
3??$?')@Ar<   zBcan't fix because of backward compat in email5, will fix in email6c                @    R pV P                  \        \        V4       R# )r  N)r   UnicodeEncodeErrorr   )r6   r  s   & r9   test_utf8_input_no_charset'TestMIMEText.test_utf8_input_no_charset1  s     E,h@r<   )r  N)rY  rZ  r[  r\  r@  r  r  r  r  r  r  unittestskipr  r]  r^  r_  s   @r9   r  r    sN     ,3-B6B ]]  AAr<   r  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestMultiparti:  c                   \        R R4      ;_uu_ 4       pVP                  4       pRRR4       \        RRRR7      p\        XRR7      pVP	                  R	R
RR7       \        R4      pVP                  V4       VP                  V4       RVR&   RVR&   RVR&   Rp\        P                  ! V4      pVR,          ^ 8X  d   \        P                  pM\        P                  pV^ 8  d   Rp	MRp	RW^$,          3,          p
\        P                  ! R\        P                  ! V4      4      V
,           VR&   W0n        W@n        WPn        R#   + '       g   i     EL); i)rd  re  N	multipartmixedr   r@  r   )rJ  ru  rr  rt  z$Hi there,

This is the dingus fish.
zBarry <barry@digicool.com>r   z)Dingus Lovers <cravindogs@cravindogs.com>r   zHere is your dingus fishrJ  g4FcpA-+z %s%04dz%a, %d %b %Y %H:%M:%SDate)r'   r   r   r   rw  r   rv   time	localtimetimezonealtzonestrftimer  r  _txt)r6   r   r`   	containerrg  intronow	timetupletzsecssigntzoffsets   &          r9   r@  TestMultipart.setUp;  s<   lD))R779D *['JG	$%56."2 	 	4  
 	8	&E	$9	) NN3'	R=A]]F\\FA:DDrk22 MM#NN3!#+,	& 		C *))s   EE	c                   V P                   pV P                  pV P                  pV P                  VP	                  4       4       V! VP                  4       R 4       V! \        VP                  4       4      ^4       V! \        VP                  ^4       VP                  ^ 4      pVP                  ^4      pV P                  W@P                  4       V P                  WPP                  4       V! VP                  4       WE.4       V P                  VP	                  4       4       V P                  VP	                  4       4       R# )rs   N)r2   r   r  
assertTruer  rI   rj  r^   
IndexErrorrz  r  r  r  )r6   r7   raisesr   m0m1s   &     r9   test_hierarchyTestMultipart.test_hierarchy_  s    ""II()
1!23
3q}}#z1==!,]]1]]1b))$b((#
1==?RH%*+*+r<   c                z    R p\        4       P                  V4      pV P                  WP                  4       4       R# )zContent-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY


--BOUNDARY--
N)r   r   r  r   )r6   r   r8   s   &  r9   test_empty_multipart_idempotent-TestMultipart.test_empty_multipart_idempotentq  s1     h%dMMO4r<   c                    \        R R4      pRVR&   RVR&   RVR&   VP                  R4       V P                  VP                  4       R	4       R
# )r  r  	A subjectrJ  aperson@dom.ainr   bperson@dom.ainr   r   zContent-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain

--BOUNDARY

--BOUNDARY--
N)r   r   r  r   r6   outers   & r9   /test_no_parts_in_a_multipart_with_none_epilogue=TestMultipart.test_no_parts_in_a_multipart_with_none_epilogue  sT    g.&i'd)f:&eoo/ 
2 
	r<   c                    \        R R4      pRVR&   RVR&   RVR&   RVn        RVn        VP                  R	4       V P	                  VP                  4       R
4       R# )r  r  r  rJ  r  r   r  r   r+   r   zContent-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY

--BOUNDARY--
N)r   preambleepiloguer   r  r   r  s   & r9   0test_no_parts_in_a_multipart_with_empty_epilogue>TestMultipart.test_no_parts_in_a_multipart_with_empty_epilogue  sb    g.&i'd)f:&eoo/ 2 	r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   VP                  R4       \        R	4      pVP	                  V4       V! VP                  4       R
4       R# )r  r  r  rJ  r  r   r  r   r   ru    Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain

--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

hello world
--BOUNDARY--
N)r  r   r   r   rv   r   r6   r7   r  r8   s   &   r9   test_one_part_in_a_multipart*TestMultipart.test_one_part_in_a_multipart  so    ""g.&i'd)f:&}%S
5??  	r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   RVn        \        R	4      pVP	                  V4       VP                  R
4       V! VP                  4       R4       R# )r  r  r  rJ  r  r   r  r   r+   ru  r   a  Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

hello world
--BOUNDARY--
Nr  r   r  r   rv   r   r   r  s   &   r9   1test_seq_parts_in_a_multipart_with_empty_preamble?TestMultipart.test_seq_parts_in_a_multipart_with_empty_preamble  sv    ""g.&i'd)f}%S:&
5??  	r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   RVn        \        R	4      pVP	                  V4       VP                  R
4       V! VP                  4       R4       R# r  r  r  rJ  r  r   r  r   Nru  r   r  r  r  s   &   r9   0test_seq_parts_in_a_multipart_with_none_preamble>TestMultipart.test_seq_parts_in_a_multipart_with_none_preamble  v    ""g.&i'd)f}%S:&
5??  	r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   RVn        \        R	4      pVP	                  V4       VP                  R
4       V! VP                  4       R4       R# r!  r  r   r  r   rv   r   r   r  s   &   r9   0test_seq_parts_in_a_multipart_with_none_epilogue>TestMultipart.test_seq_parts_in_a_multipart_with_none_epilogue  r$  r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   RVn        \        R	4      pVP	                  V4       VP                  R
4       V! VP                  4       R4       R# )r  r  r  rJ  r  r   r  r   r+   ru  r   r  Nr&  r  s   &   r9   1test_seq_parts_in_a_multipart_with_empty_epilogue?TestMultipart.test_seq_parts_in_a_multipart_with_empty_epilogue  sv    ""g.&i'd)f}%S:&
5??  	r<   c                    V P                   p\        R R4      pRVR&   RVR&   RVR&   RVn        \        R	4      pVP	                  V4       VP                  R
4       V! VP                  4       R4       R# )r  r  r  rJ  r  r   r  r   r*   ru  r   a  Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain

--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

hello world
--BOUNDARY--

Nr&  r  s   &   r9   .test_seq_parts_in_a_multipart_with_nl_epilogue<TestMultipart.test_seq_parts_in_a_multipart_with_nl_epilogue/  sv    ""g.&i'd)f}%S:&
5??  	r<   c                   V P                   pV P                  R 4      pV! \        VP                  4       4      ^4       VP                  ^4      pV! VP	                  4       R4       V! \        VP                  4       4      ^4       VP                  4        Fb  pV! VP	                  4       R4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP	                  4       R4       Kd  	  R# )
msg_36.txtzmultipart/alternativezmessage/external-bodyr@   N)r2   r3   rj  r^   rI   )r6   r7   r8   msg1r   
subsubparts   &     r9   test_message_external_body(TestMultipart.test_message_external_bodyJ  s    ll<(
3s !1%q!
4  "$;<
3t!"A&'')Gw'')+BCs7&&()1- ,,Q/Jz**,l;	 *r<   c                z    V P                  R 4      pV P                  \        VP                  4       4      ^4       R# )z
msg_37.txtN)r3   r2   rj  r^   ro   s   & r9   test_double_boundary"TestMultipart.test_double_boundaryW  s.     ll<(S__./3r<   c                    V P                   pV P                  R 4      p\        4       p\        P                  ! W#4       V! VP                  4       R4       R# )z
msg_38.txtzmultipart/mixed
    multipart/mixed
        multipart/alternative
            text/plain
        text/plain
    text/plain
    text/plain
Nr  r3   r   r!   
_structurer   r6   r7   r8   r  s   &   r9   )test_nested_inner_contains_outer_boundary7TestMultipart.test_nested_inner_contains_outer_boundary^  sG    ""
 ll<(jS&
3<<>  	r<   c                    V P                   pV P                  R 4      p\        4       p\        P                  ! W#4       V! VP                  4       R4       R# )z
msg_39.txtzmultipart/mixed
    multipart/mixed
        multipart/alternative
        application/octet-stream
        application/octet-stream
    text/plain
Nr9  r;  s   &   r9   test_nested_with_same_boundary,TestMultipart.test_nested_with_same_boundaryq  sG    "" ll<(jS&
3<<>  	r<   c                h    V P                  R 4      pV P                  VP                  4       R4       R# )z
msg_40.txtzMIME-Version: 1.0
Content-Type: text/html; boundary="--961284236552522269"

----961284236552522269
Content-Type: text/html;
Content-Transfer-Encoding: 7Bit

<html></html>

----961284236552522269--
N)r3   r2   r   ro   s   & r9   test_boundary_in_non_multipart,TestMultipart.test_boundary_in_non_multipart  s+    ll<( + 	r<   c                    V P                   p\        P                  ! R 4      pV P                  VP	                  4       4       V! VP                  4       R4       V! \        VP                  4       4      ^4       R# )zMIME-Version: 1.0
Content-Type: multipart/mixed; boundary="    XXXX"

--    XXXX
Content-Type: text/plain


--    XXXX
Content-Type: text/plain

--    XXXX--
z    XXXXN)r2   r   r  r   r  r   rj  r^   r5   s   &  r9    test_boundary_with_leading_space.TestMultipart.test_boundary_with_leading_space  sb    '' )  	((*+
3z*
3s !1%r<   c                    \        4       P                  R 4      pV P                  VP                  ^ 4      P                  4       R4       R# )zContent-Type: multipart/mixed; boundary="===============0012394164=="
MIME-Version: 1.0

--===============0012394164==
Content-Type: image/file1.jpg
MIME-Version: 1.0
Content-Transfer-Encoding: base64

YXNkZg==
--===============0012394164==--zYXNkZg==N)r   r   r2   r^   rL  s   & r9   &test_boundary_without_trailing_newline4TestMultipart.test_boundary_without_trailing_newline  s=    H 
# 
$ 	q)557Dr<   c                    \        R R4      pV P                  VP                  \        P                  P                  4       R# )r  r  N)r   rz  r   r   r  rL  s   & r9   test_mimebase_default_policy*TestMultipart.test_mimebase_default_policy  s*    ['*ahh 5 56r<   c                    \        R R\        P                  P                  R7      pV P	                  VP                  \        P                  P                  4       R# )r  r  r   N)r   r   r   r  rz  rL  s   & r9   test_mimebase_custom_policy)TestMultipart.test_mimebase_custom_policy  s6    ['%,,2F2FGahh 4 45r<   )r  r  r  N)rY  rZ  r[  r\  r@  r  r  r  r  r  r  r"  r'  r*  r-  r3  r6  r<  r?  rB  rE  rH  rK  rN  r]  r^  r_  s   @r9   r  r  :  sp     "H,$5"$*286666<4&"&&E76 6r<   r  c                      a  ] tR tRt o R tR tR t]P                  ! R4      t	R t
R tR tR	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )TestNonConformanti  c                    V P                   pV P                  R 4      pV! VP                  4       R4       V! VP                  4       R4       V! VP	                  4       R4       R# )z
msg_14.txtr@   r   r  N)r2   r3   rI   r  r  r5   s   &  r9   test_parse_missing_minor_type/TestNonConformant.test_parse_missing_minor_type  sT    ll<(
3!<0
3##%v.
3""$g.r<   c                   V P                  R 4      pVP                  ^ 4      pV P                  VR4       V P                  \	        VP
                  4      ^4       V P                  VP
                  ^ ,          \        P                  4       R# )
msg_15.txtr  N)	r3   r^   assertHasAttrr2   rj  r  r  r    StartBoundaryNotFoundDefect)r6   r8   inners   &  r9   test_same_boundary_inner_outer0TestNonConformant.test_same_boundary_inner_outer  sj    ll<("5),U]]+Q/emmA.$@@	Br<   c                ~   V P                  R 4      pV P                  VP                  4       \        4       V P	                  \        VP                  4      ^4       V P                  VP                  ^ ,          \        P                  4       V P                  VP                  ^,          \        P                  4       R# )z
msg_25.txtN)
r3   r  r^   r   r2   rj  r  r    NoBoundaryInMultipartDefect!MultipartInvariantViolationDefectro   s   & r9   test_multipart_no_boundary,TestNonConformant.test_multipart_no_boundary  s    ll<(coo/5S[[)1-ckk!n$@@	Bckk!n$FF	Hr<   a^          Date: Wed, 14 Nov 2007 12:56:23 GMT
        From: foo@bar.invalid
        To: foo@bar.invalid
        Subject: Content-Transfer-Encoding: base64 and multipart
        MIME-Version: 1.0
        Content-Type: multipart/mixed;
            boundary="===============3344438784458119861=="{}

        --===============3344438784458119861==
        Content-Type: text/plain

        Test message

        --===============3344438784458119861==
        Content-Type: application/octet-stream
        Content-Transfer-Encoding: base64

        YWJj

        --===============3344438784458119861==--
        c                   V P                  V P                  P                  R 4      4      pV P                  \	        VP
                  4      ^4       V P                  VP
                  ^ ,          \        P                  4       R# )z"
Content-Transfer-Encoding: base64N)	_str_msgmultipart_msgr7  r2   rj  r  r  r    -InvalidMultipartContentTransferEncodingDefectro   s   & r9   test_multipart_invalid_cte,TestNonConformant.test_multipart_invalid_cte  sa    mm%%&KLNS[[)1-ckk!n@@	Br<   c                    V P                  V P                  P                  R 4      4      pV P                  \	        VP
                  4      ^ 4       R# r+   Nrb  rc  r7  r2   rj  r  ro   s   & r9   test_multipart_no_cte_no_defect1TestNonConformant.test_multipart_no_cte_no_defect  s:    mmD..55b9:S[[)1-r<   c                    R Fa  pV P                  V P                  P                  RP                  V4      4      4      pV P                  \	        VP
                  4      ^ 4       Kc  	  R# )rq  z
Content-Transfer-Encoding: {}N)rq  re   BINaryri  r6   r   r8   s   &  r9   "test_multipart_valid_cte_no_defect4TestNonConformant.test_multipart_valid_cte_no_defect  sY    -C--""))5<<SACDC S-q1	 .r<   c                   V P                   pV P                  p\        4       pR VR&   V! VP                  4       R 4       V! VP	                  4       R4       V! VP                  4       R4       VR RVR&   V! VP                  4       R 4       V! VP	                  4       R4       V! VP                  4       R4       \        4       p\        V4      pVP                  V4       V! VP                  4       R4       R# )r   rE   r  r@   rA   r   zContent-Type: foo

N)
r2   r  r   r  r  rI   r   r   r   r   )r6   r7   neqr8   r   r   s   &     r9   test_invalid_content_type+TestNonConformant.test_invalid_content_type	  s    ##i$N
3##%v.
3""$g.
3!<0#N
3##%v.
3""$g.
3!<0JaL			#AJJL12r<   c                n    V P                   pV P                  R 4      pV! VP                  4       R4       R# )
msg_31.txtzm--BOUNDARY
Content-Type: text/plain

message 1

--BOUNDARY
Content-Type: text/plain

message 2

--BOUNDARY--
N)r  r3   r^   r5   s   &  r9   test_no_start_boundary(TestNonConformant.test_no_start_boundary	  s1    ""ll<(
3??  	r<   c                n    V P                   pV P                  R 4      pV! VP                  4       R4       R# )z
msg_35.txtzFrom: aperson@dom.ain
To: bperson@dom.ain
Subject: here's something interesting

counter to RFC 2822, there's no separating newline here
N)r  r3   r   r5   s   &  r9   test_no_separating_blank_line/TestNonConformant.test_no_separating_blank_line+	  s0    ""ll<(
3==?  	r<   c                Z   V P                  R 4      pV P                  VR4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          \        P                  4       V P                  VP                  ^,          \        P                  4       R# )z
msg_41.txtr  N)	r3   rW  r2   rj  r  r  r    r]  r^  ro   s   & r9   test_lying_multipart&TestNonConformant.test_lying_multipart7	  s}    ll<(3	*S[[)1-ckk!n$@@	Bckk!n$FF	Hr<   c                   V P                  R 4      pVP                  ^4      P                  ^ 4      pV P                  \        VP                  4      ^4       V P                  VP                  ^ ,          \        P                  4       R# )z
msg_42.txtN)r3   r^   r2   rj  r  r  r    rX  )r6   r  bads   &  r9   test_missing_start_boundary-TestNonConformant.test_missing_start_boundaryA	  sh    \* "..q1S[[)1-ckk!n$@@	Br<   c                   V P                   pR p\        P                  ! V4      pV! VP                  4       R.4       V! VP	                  4       R4       V! \        VP                  4      ^4       V P                  VP                  \        P                  .4       V! VP                  ^ ,          P                  R4       R# )z Line 1
Subject: test

bodyrJ  bodyz Line 1
N)r2   r   r  r  r^   rj  r  rU  r    #FirstHeaderLineIsContinuationDefectliner1  s   &   r9   &test_first_line_is_continuation_header8TestNonConformant.test_first_line_is_continuation_headerQ	  s    ,''*
388:	{#
3??f%
3s{{Q"("L"L!M	O
3;;q>,r<   c                    V P                  R 4      pV P                  VP                  4       R.4       V P                  VP                  4       R4       V P	                  VP
                  \        P                  .4       R# )z&Subject: test
not a header
To: abc

b
rJ  znot a header
To: abc

b
N)rb  r2   r  r^   rU  r  r     MissingHeaderBodySeparatorDefectro   s   & r9   "test_missing_header_body_separator4TestNonConformant.test_missing_header_body_separator]	  sd    
 mmIJi[1*,JK!'!H!H I	Kr<   c                $   R p\         P                  ! \        P                  ! RV R24      \         P                  P
                  R7      pV P                  VP                  RR7      R4       V P                  VR,          P                  . 4       R# )	base64 #        Content-Transfer-Encoding: '

        SGVsbG8uIFRlc3Rpbmc=
        r   Tr\   rS  rC   NrT  rn  s   &  r9   .test_string_payload_with_extra_space_after_cte@TestNonConformant.test_string_payload_with_extra_space_after_cteh	  s    '' =$$'5 )	9 ) \\))	+
 	57HI$? @ H H"Mr<   c                N   \         P                  ! \        P                  ! R 4      \         P                  P
                  R7      pV P                  VP                  RR7      R4       VR,          pV P                  VP                  \         P                  P                  .4       R# )zZ        Content-Transfer-Encoding: base64 some text

        SGVsbG8uIFRlc3Rpbmc=
        r   Tr\   rS  rC   N)r   r  r   r   r   r  r2   r^   rU  r  r    InvalidHeaderDefect)r6   r8   r   s   &  r9   -test_string_payload_with_extra_text_after_cte?TestNonConformant.test_string_payload_with_extra_text_after_ctes	  s{    '' 9 ) \\))	+
 	57HI-.ell.N.N-OPr<   c                J   R p\         P                  ! \        P                  ! RV R24      \         P                  P
                  R7      pVR,          pV P                  W14       V P                  VP                  RR7      R4       V P                  VP                  . 4       R# )	r  r  r  r   rC   Tr\   rS  N)
r   r  r   r   r   r  r2   r^   rU  r  )r6   r   r8   
pasted_ctes   &   r9   7test_string_payload_with_extra_space_after_cte_compat32ITestNonConformant.test_string_payload_with_extra_space_after_cte_compat32}	  s    '' =$$'5 )	9 ) \\**	,
 45
)57HIR0r<   rX  N)rY  rZ  r[  r\  rS  rZ  r_  r   r   rc  re  rj  ro  rs  rw  rz  r}  r  r  r  r  r  r  r]  r^  r_  s   @r9   rQ  rQ    sw     /BH OO % M0B.
23*"	HB 	-	K	NQ
1 
1r<   rQ  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tRtV tR# )TestRFC2047i	  c                    V P                   pR p\        V4      pV! V. RO4       \        V4      pV! \        V4      R4       V P	                  VP                  ^LR7      R4       R# )zVRe: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz
 foo bar =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=Nu+   Re: räksmörgås baz foo bar räksmörgåsr  ziRe: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?=
 =?mac-iceland?q?=9Arg=8Cs?=))s   Re: Ns
   rksmrgszmac-iceland)s    baz foo bar Nr  )r2   r   r   r   r  r   r6   r7   r   dhr   s   &    r9   test_rfc2047_multiline"TestRFC2047.test_rfc2047_multiline	  sj    /1
2 5 	6
 R
3v;D	Ffmmrm: =  	!r<   c                    V P                   pR p\        V4      pV! VRR.4       \        \        V4      4      pV! VR4       R# )z0=?ISO-8859-1?Q?Andr=E9?= Pirard <pirard@dom.ain>Nu   André Pirard <pirard@dom.ain>)s   Andrr>   )s    Pirard <pirard@dom.ain>Nr2   r   r   r   r  s   &    r9   test_whitespace_keeper_unicode*TestRFC2047.test_whitespace_keeper_unicode	  sJ    >1
2+35 	6[_%
656r<   c                    V P                   pR p\        V4      pV! V. RO4       \        \        V4      4      pV! VR4       R# )zWThe =?iso-8859-1?b?cXVpY2sgYnJvd24gZm94?= jumped over the =?iso-8859-1?b?bGF6eSBkb2c=?=Nz,The quick brown fox jumped over the lazy dog))s   The N)s   quick brown foxr>   )s    jumped over the N)s   lazy dogr>   r  )r6   r7   r   r  hus   &    r9    test_whitespace_keeper_unicode_2,TestRFC2047.test_whitespace_keeper_unicode_2	  sF    e1
2 K 	LR!
2=>r<   c                H    R p\        V4      pV P                  V. RO4       R# )z3Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbordN))s   SmN   r>   )s   rgN   r>   )s   sbordNr   r2   r6   r   r  s   &  r9   test_rfc2047_missing_whitespace+TestRFC2047.test_rfc2047_missing_whitespace	  s&    A1 0 	1r<   c                H    R p\        V4      pV P                  V. RO4       R# )z7Sm =?ISO-8859-1?B?9g==?= rg =?ISO-8859-1?B?5Q==?= sbordN))s   Sm Nr  )s    rg Nr  )s    sbordNr  r  s   &  r9   test_rfc2047_with_whitespace(TestRFC2047.test_rfc2047_with_whitespace	  s&    E1 1 	2r<   c                r    R p. ROpV F*  w  r4\        W,          4      pV P                  WTR3.4       K,  	  R# )z=?iso-8859-1?B?%s?=r>   N))zdm==   v)zdm=r  )dmr  )zdmk=   vi)dmkr  r  )r6   r   r`   qar  s   &     r9   test_rfc2047_B_bad_padding&TestRFC2047.test_rfc2047_B_bad_padding	  s>    ! DAqu%BRl"3!45 r<   c                B    R pV P                  \        V4      R.4       R# )z=?iso-8859-1?Q?andr=e9=zz?=N)s   andr=zzr>   r2   r   r6   r   s   & r9   test_rfc2047_Q_invalid_digits)TestRFC2047.test_rfc2047_Q_invalid_digits	  s"    )q)78	:r<   c                D    R pV P                  \        V4      . RO4       R# )z(=?ISO-8859-1?Q?a?=)N)   (N   ar>      )Nr  r  s   & r9   test_rfc2047_rfc2047_1"TestRFC2047.test_rfc2047_rfc2047_1	  s     "q)>	@r<   c                D    R pV P                  \        V4      . RO4       R# )z(=?ISO-8859-1?Q?a?= b)N)r  r  )s    b)Nr  r  s   & r9   test_rfc2047_rfc2047_2"TestRFC2047.test_rfc2047_rfc2047_2	       $q)@	Br<   c                D    R pV P                  \        V4      . RO4       R# )z'(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)Nr  )s   abr>   r  r  r  s   & r9   test_rfc2047_rfc2047_3"TestRFC2047.test_rfc2047_rfc2047_3	  s     5q)?	Ar<   c                D    R pV P                  \        V4      . RO4       R# )z((=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)Nr  r  r  s   & r9   test_rfc2047_rfc2047_4"TestRFC2047.test_rfc2047_rfc2047_4	  s     6q)?	Ar<   c                D    R pV P                  \        V4      . RO4       R# )z,(=?ISO-8859-1?Q?a?=
    =?ISO-8859-1?Q?b?=)Nr  r  r  s   & r9   test_rfc2047_rfc2047_5a#TestRFC2047.test_rfc2047_rfc2047_5a	  s     <q)?	Ar<   c                D    R pV P                  \        V4      . RO4       R# )z+(=?ISO-8859-1?Q?a?=
    =?ISO-8859-1?Q?b?=)Nr  r  r  s   & r9   test_rfc2047_rfc2047_5b#TestRFC2047.test_rfc2047_rfc2047_5b	  s     :q)?	Ar<   c                D    R pV P                  \        V4      . RO4       R# )z(=?ISO-8859-1?Q?a_b?=)N)r  )s   a br>   r  r  r  s   & r9   test_rfc2047_rfc2047_6"TestRFC2047.test_rfc2047_rfc2047_6	  r  r<   c           	        R pV P                  \        V4      . RO4       V P                  \        \        V4      4      P                  4       VP	                  4       4       V P                  \        \        \        V4      4      4      R4       R# )z((=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)Nz(a b))r  r  )s    br|   r  )r2   r   r   r   r   r   r  s   & r9   test_rfc2047_rfc2047_7"TestRFC2047.test_rfc2047_rfc2047_7	  sk    6q)	 	]1%56==?K[q)9:;WEr<   c           	     <   R pV P                  \        V4      RR.4       V P                  \        \        V4      4      P                  4       RP	                  VP                  4       4      4       V P                  \        \        \        V4      4      4      R4       R# )z9=?windows-1252?q?=22M=FCller_T=22?=
 <T.Mueller@xxx.com>Nr+   u   "Müller T" <T.Mueller@xxx.com>)s
   "Mller T"zwindows-1252)s   <T.Mueller@xxx.com>N)r2   r   r   r   r   
splitlinesr   r  s   & r9   test_multiline_header!TestRFC2047.test_multiline_header
  s    Iq)/+-	. 	]1%56==?0	2[q)9:;:	<r<   c                B    R pV P                  \        V4      R.4       R# )header without encoded wordsN)r  Nr  r  s   & r9   test_unencoded_ascii TestRFC2047.test_unencoded_ascii
  s"    *q)34	6r<   c                B    R pV P                  \        V4      R.4       R# ),   header with unexpected non ASCII caractèresN)r  Nr  r  s   & r9   test_unencoded_utf8TestRFC2047.test_unencoded_utf8
  s#    <q)EF	Hr<   rX  N)rY  rZ  r[  r\  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r]  r^  r_  s   @r9   r  r  	  sn     !"7?126:@BAAAABF<6H Hr<   r  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tRtV tR# )TestMIMEMessagei
  c                    \        R RR7      ;_uu_ 4       pVP                  4       V n        RRR4       R#   + '       g   i     R# ; i)
msg_11.txtrZ   r   N)r'   r   _textr6   r   s   & r9   r@  TestMIMEMessage.setUp
  s-    lW55DJ 6555s	   6A	c                <    V P                  \        \        R 4       R# )za plain stringN)r   ru   r   r?  s   &r9   test_type_errorTestMIMEMessage.test_type_error
  s    )[2BCr<   c                F   V P                   pR p\        4       pW#R&   \        V4      pV! VP                  4       R4       VP	                  4       pV P                  V\        4       V! \        V4      ^4       V^ ,          pV P                  Wc4       V! VR,          V4       R# )zA sub-messagerJ  r  subjectN)	r2   r   r   rI   r^   r  listrj  rz  )r6   r7   r  r   rrn  r   s   &      r9   test_valid_argument#TestMIMEMessage.test_valid_argument!
  s    !I)N
1!12--/gt,
3w<!*g!
79w'r<   c                    \        4       pR VR&   \        4       pRVR&   \        V4      pV P                  \        P                  VP
                  V4       R# )	subpart 1rJ  z	subpart 2N)r   r   r   r    MultipartConversionErrorrv   )r6   r1  r  r  s   &   r9   test_bad_multipart"TestMIMEMessage.test_bad_multipart/
  sH    y%Yy%Y&99188TJr<   c                    \        4       pR VR&   VP                  R4       \        V4      pRVR&   \        4       p\	        V4      pVP                  V4       V P                  VP                  4       R4       R# )An enclosed messagerJ  !Here is the body of the message.
zThe enclosing messagezContent-Type: message/rfc822
MIME-Version: 1.0
Subject: The enclosing message

Subject: An enclosed message

Here is the body of the message.
N)r   rU   r   r   r   r   r2   r   )r6   r   r  r   r   s   &    r9   test_generateTestMIMEMessage.test_generate7
  sg    I,)	:;N.)JaL			! ( 	r<   c                j   V P                   pV P                  R 4      pV! VP                  4       R4       VP                  4       pV P	                  V\
        4       V! \        V4      ^4       V^ ,          pV P	                  V\        4       V! VR,          R4       V! VP                  4       R4       R# )r  r  r  r  r  N)r2   r3   rI   r^   r  r  rj  r   )r6   r7   r8   rn  submsgs   &    r9   test_parse_message_rfc822)TestMIMEMessage.test_parse_message_rfc822K
  s    ll<(
3!#34//#gt,
3w<fg.
6)34
6!EFr<   c                   V P                   pV P                  R 4      pV! VP                  4       R4       V P                  VP	                  4       4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP                  ^4      pV! VP                  4       R4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV P                  V\        4       V! VR,          R4       V! VP                  RRR	7      R
4       V! VP                  RRR	7      R4       VP                  ^4      pV P                  V\        4       V! VR,          R4       V! VP                  RR	7      RR.4       V! VP                  RRR	7      R
4       VP                  ^4      pV! VP                  4       R4       VP                  4       pV P                  V\        4       V! \        V4      ^4       V^ ,          pV P                  V\        4       V! VP                  4       R4       V! VR,          R4       R# )
msg_16.txtrh  r@   a  This report relates to a message you sent with the following header fields:

  Message-id: <002001c144a6$8752e060$56104586@oxy.edu>
  Date: Sun, 23 Sep 2001 20:10:55 -0700
  From: "Ian T. Henry" <henryi@oxy.edu>
  To: SoCal Raves <scr@socal-raves.org>
  Subject: [scr] yeah for Ians!!

Your message cannot be delivered to the following recipients:

  Recipient address: jangel1@cougar.noc.ucla.edu
  Reason: recipient reached disk quota

zmessage/delivery-statuszoriginal-envelope-idz"0GK500B4HD0888@cougar.noc.ucla.edudnszreporting-mtar5  r+   nsdNactionfailedzoriginal-recipientr  zfinal-recipientr  
message-idz(<002001c144a6$8752e060$56104586@oxy.edu>)r  r+   )zjangel1@cougar.noc.ucla.edur+   )r2   r3   rI   r   r  rj  r^   r  r   rJ   r<  r  )r6   r7   r8   r   dsn1dsn2rn  r2  s   &       r9   test_dsnTestMIMEMessage.test_dsnW
  s"   ll<(
3!#56((*+
3s !1%//!$
7##%|4
7  # 	$ //!$
7##%'@A
3w""$%q) ""1%dG,
4&')MN
4>>%>8"=
4>>%>8$?""1%dG,
4>8$
4??"6?7?@	B
4>>(+<>=rB//!$
7##%'78%%'gt,
3w<QZ
j'2
:&&(,7
:l#5	7r<   c                    V P                   p\        R RR7      ;_uu_ 4       pVP                  4       pRRR4       \        4       pRVR&   RVR&   RVR	&   R
Vn        RVn        \        R4      p\        R4      pVP                  RRRR7       VP                  V4       VP                  V4       \        4       p\        V4      pVP                  V4       V! VP                  4       X4       R#   + '       g   i     L; i)
msg_21.txtrZ   r   Nr  r   r  r   r  rJ  MIME messagezEnd of MIME message
r  r  rE   rs   r   r  )r  r'   r   r   r  r  r   rw  rv   r   r   r   r   )	r6   r7   r   r   r8   r1  r  r  r   s	   &        r9   test_epilogueTestMIMEMessage.test_epilogue
  s    ""lW55779D 6i'F%D	I%.~'8:N

4

4jcN			#
3<<>4 ! 65s   C--C=	c                2   V P                   p\        4       pR VR&   RVR&   RVR&   RVn        RVn        \	        R4      p\	        R	4      pVP                  R
RRR7       VP                  V4       VP                  V4       V! VP                  4       R4       R# )r  r   r  r   r  rJ  r  r+   r  r  rE   rs   r   r  ad  From: aperson@dom.ain
To: bperson@dom.ain
Subject: Test
Content-Type: multipart/mixed; boundary="BOUNDARY"

MIME message
--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

One
--BOUNDARY
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

Two
--BOUNDARY--
N)r  r   r  r  r   rw  rv   r   )r6   r7   r8   r1  r  s   &    r9   test_no_nl_preamble#TestMIMEMessage.test_no_nl_preamble
  s    ""i'F%D	I%~'8:N

4

4
3==?  	r<   c                   V P                   p\        R RR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       XP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       R#   + '       g   i     EL; i)r  rZ   r   Nr  r@   r2   r'   r   message_from_filer^   get_default_typerI   r6   r7   r   r8   
container1
container2container1acontainer2as   &       r9   test_default_type!TestMIMEMessage.test_default_type
     lW55))"-C 6__Q'

:&&(*:;
:&&(*:;__Q'

:&&(*:;
:&&(*:; ,,Q/
;'')<8
;'')<8 ,,Q/
;'')<8
;'')<8 655   D??E	c                   V P                   p\        R RR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       XP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP	                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       R#   + '       g   i     EL; i)r  rZ   r   Nr  r@   r#  r&  s   &       r9   .test_default_type_with_explicit_container_type>TestMIMEMessage.test_default_type_with_explicit_container_type
  r-  r.  c                   V P                   pV P                  p\        R R4      pRVn        \	        R4      p\	        R4      p\        V4      p\        V4      pVP                  V4       VP                  V4       V! VP                  4       R4       V! VP                  4       R4       V! VP                  4       R4       V! VP                  4       R4       V! VP                  ^ 4      R4       VR VR VR VR V! VP                  4       R4       V! VP                  4       R4       V! VP                  4       R4       V! VP                  4       R4       V! VP                  ^ 4      R	4       R
# )digestr   r+   
message 1

message 2
r  a  Content-Type: multipart/digest; boundary="BOUNDARY"
MIME-Version: 1.0

--BOUNDARY
Content-Type: message/rfc822
MIME-Version: 1.0

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

message 1

--BOUNDARY
Content-Type: message/rfc822
MIME-Version: 1.0

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

message 2

--BOUNDARY--
rA   r?   aB  Content-Type: multipart/digest; boundary="BOUNDARY"
MIME-Version: 1.0

--BOUNDARY

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

message 1

--BOUNDARY

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

message 2

--BOUNDARY--
N)
r2   r  r   r  r   r   rv   rI   r%  r   )r6   r7   rr  r  	subpart1a	subpart2asubpart1subpart2s   &       r9   test_default_type_non_parsed,TestMIMEMessage.test_default_type_non_parsed
  sf   ##!(J7		]+	]+	y)y)""
8$$&(89
8$$&(89
8$$&(89
8$$&(89I" % 	4 ^$^$^$^$
8$$&(89
8$$&(89
8$$&(89
8$$&(89I" % 	r<   c                   V P                   p\        R 4      p\        R 4      p\        W#3R7      pV! \        VP	                  4       4      ^4       V! VP	                  ^ 4      V4       V! VP	                  ^4      V4       R# )r+   )	_subpartsN)r2   r   r   rj  r^   )r6   r7   text1text2r8   s   &    r9   $test_mime_attachments_in_constructor4TestMIMEMessage.test_mime_attachments_in_constructor3  sg    un5
3s !1%
3??1u%
3??1u%r<   c                X    \        4       pV P                  VP                  4       4       R # rm   )r   r   r  ro   s   & r9   "test_default_multipart_constructor2TestMIMEMessage.test_default_multipart_constructor<  s    o((*+r<   c                t    \        4       pR VR&   RVR&   V P                  VP                  R4      R R.4       R# )a@b.comr   c@d.comr   N)r   r2   r4   ro   s   & r9   test_multipart_default_policy-TestMIMEMessage.test_multipart_default_policy@  s9    oD	D	T*Y	,BCr<   c                   \        \        P                  P                  R 7      pRVR&   V P	                  \
        4      ;_uu_ 4       pRVR&   RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)r   rF  r   rG  Nz.There may be at most 1 To headers in a message)	r   r   r   r  r   r  r2   r   r&  )r6   r8   r(  s   &  r9   test_multipart_custom_policy,TestMIMEMessage.test_multipart_custom_policyF  sf    5<<#7#78D	z**b!CI +R\\*I	K +*s   A<<B	)r  N)rY  rZ  r[  r\  r@  r  r  r  r	  r  r  r  r   r+  r0  r:  r@  rC  rH  rK  r]  r^  r_  s   @r9   r  r  
  sd     #D(K(
G77r!(!F9"9"HT&,DK Kr<   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestNonMultipartiP  c                \    \        R R4      pV P                  VP                  4       4       R# )r   r  N)r   r  r  ro   s   & r9   "test_nonmultipart_is_not_multipart3TestNonMultipart.test_nonmultipart_is_not_multipartQ  s%    vw/))+,r<   c                    \        4       pR VR&   \        RR4      pV P                  \        P                  VP
                  V4       R# )r  rJ  r   r  N)r   r   r   r    r  rv   )r6   r8   r  s   &  r9   test_attach_raises_exception-TestNonMultipart.test_attach_raises_exceptionU  s:    i$IVW-&99188SIr<   rX  N)rY  rZ  r[  r\  rP  rS  r]  r^  r_  s   @r9   rN  rN  P  s     -J Jr<   rN  c                      a  ] tR tRt o RtR tRR ltR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestIdempotentia  r*   c                    \        VR R7      ;_uu_ 4       pVP                  4       pRRR4       \        P                  ! X4      pWC3#   + '       g   i     L); irZ   r   Nr'   r   r   r  r6   r  r   r`   r8   s   &&   r9   r3   TestIdempotent._msgobje  sB    h11R779D 2''-y 21s   AA	c                    V P                   p\        4       p\        V^ R7      pVP                  WR7       V! W%P	                  4       4       R# )r   r	  r   N)r  r   r   r   r   )r6   r8   r   r   r7   r   r   s   &&&&   r9   _idempotentTestIdempotent._idempotentk  s<    ""Jaa(			#	)
4r<   c                   V P                   pV P                  R 4      w  r#V! VP                  4       R4       V! VP                  4       R4       V! VP	                  4       R4       V! VP                  4       ^,          R4       V! VP                  R4      R4       V! VP                  R4       V! VP                  R4       V P                  W#4       R# )r   r@   r   r  rB   rP   N)rB   rP   )
r2   r3   rI   r  r  r<  rJ   r  r  r]  r6   r7   r8   r   s   &   r9   test_parse_text_message&TestIdempotent.test_parse_text_messager  s    LL.	
3!<0
3##%v.
3""$g.
3>>A 78
3==#Z0
3<<
3<<#r<   c                    V P                   pV P                  R 4      w  r#V! VP                  4       R4       V! VP                  4       R4       V! VP	                  R4      R4       V P                  W#4       R# )r   r@   NrB   )r2   r3   rI   r<  rJ   r]  r`  s   &   r9   test_parse_untyped_message)TestIdempotent.test_parse_untyped_message~  sb    LL.	
3!<0
3>>T"
3==#T*#r<   c                N    V P                  R 4      w  rV P                  W4       R# )r   Nr3   r]  r6   r8   r   s   &  r9   test_simple_multipart$TestIdempotent.test_simple_multipart       LL.	#r<   c                N    V P                  R 4      w  rV P                  W4       R# )
msg_02.txtNrg  rh  s   &  r9   test_MIME_digestTestIdempotent.test_MIME_digest  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )z
msg_27.txtNrg  rh  s   &  r9   test_long_headerTestIdempotent.test_long_header  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )r  Nrg  rh  s   &  r9   "test_MIME_digest_with_part_headers1TestIdempotent.test_MIME_digest_with_part_headers  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )
msg_06.txtNrg  rh  s   &  r9   test_mixed_with_image$TestIdempotent.test_mixed_with_image  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )re  Nrg  rh  s   &  r9   test_multipart_report$TestIdempotent.test_multipart_report  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )r  Nrg  rh  s   &  r9   r  TestIdempotent.test_dsn  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )r  Nrg  rh  s   &  r9   test_preamble_epilogue%TestIdempotent.test_preamble_epilogue  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )z
msg_23.txtNrg  rh  s   &  r9   test_multipart_one_part&TestIdempotent.test_multipart_one_part  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )z
msg_24.txtNrg  rh  s   &  r9   test_multipart_no_parts&TestIdempotent.test_multipart_no_parts  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )rv  Nrg  rh  s   &  r9   rw  %TestIdempotent.test_no_start_boundary  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )
msg_32.txtNrg  rh  s   &  r9   test_rfc2231_charset#TestIdempotent.test_rfc2231_charset  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )z
msg_33.txtNrg  rh  s   &  r9   test_more_rfc2231_parameters+TestIdempotent.test_more_rfc2231_parameters  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )z
msg_34.txtNrg  rh  s   &  r9   %test_text_plain_in_a_multipart_digest4TestIdempotent.test_text_plain_in_a_multipart_digest  rk  r<   c                N    V P                  R 4      w  rV P                  W4       R# )zmsg_12a.txtNrg  rh  s   &  r9   test_nested_multipart_mixeds+TestIdempotent.test_nested_multipart_mixeds  s     LL/	#r<   c                N    V P                  R 4      w  rV P                  W4       R# )r0  Nrg  rh  s   &  r9   %test_message_external_body_idempotent4TestIdempotent.test_message_external_body_idempotent  rk  r<   c                R    V P                  R 4      w  rV P                  WRR7       R# )
msg_43.txtTr   Nrg  rh  s   &  r9   test_message_delivery_status+TestIdempotent.test_message_delivery_status  s%    LL.	T2r<   c                N    V P                  R 4      w  rV P                  W4       R# 
msg_45.txtNrg  rh  s   &  r9   test_message_signed_idempotent-TestIdempotent.test_message_signed_idempotent  rk  r<   c                l   V P                   pV P                  R 4      w  r#V! VP                  4       R4       / pVP                  4        F	  w  rVWdV&   K  	  V! VR,          R4       V! VR,          R4       V! VP                  RV P
                  ,           4       V! VP                  V P
                  4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       R4       V! VP                  4       RV P
                  ,           4       VP                  ^4      pV! VP                  4       R4       V! VP                  4       RV P
                  ,           4       VP                  ^4      p	V! V	P                  4       R	4       V P                  V	\        4       V	P                  4       p
V P                  V
\        4       V! \        V
4      ^4       V
^ ,          pV P                  V\        4       V! VP                  4       RV P
                  ,           4       R
# )re  rh  rf  rk  r@  rj  z$This is a MIME-encapsulated message.r@   zYadda yadda yaddar  N)r2   r3   rI   r<  r  r   r  rj  r^   r  r   r  )r6   r7   r8   r   paramspkpvr1  r  msg3rn  msg4s   &           r9   test_content_type TestIdempotent.test_content_type  s   LL.	
3!#56nn&FB2J '
6- "34
6*FG
3<<?$,,NO
3<<&
3s !1%q!
4  "L1
42T\\ABq!
4  "L1
42T\\ABq!
4  "$45dG,""$gt,
3w<qzdG,
42T\\ABr<   c                   V P                   pV P                  R 4      w  r#V! VP                  4       R4       VP                  4       pV P	                  V\
        4       V! \        V4      ^4       V^ ,          pV P	                  V\        4       V! VP                  4       R4       V P	                  VP                  4       \        4       V! VP                  4       V P                  4       R# )rw  r  r@   N)
r2   r3   rI   r^   r  r  rj  r   r   r   )r6   r7   r8   r   rn  r1  s   &     r9   test_parserTestIdempotent.test_parser  s    LL.	
3!#34 //#gt,
3w<qzdG,
4  "L1d..0#6
4t||,r<   rX  NF)rY  rZ  r[  r\  r   r3   r]  ra  rd  ri  rn  rq  rt  rx  r{  r  r  r  r  rw  r  r  r  r  r  r  r  r  r  r]  r^  r_  s   @r9   rV  rV  a  s     G
$$$$$$$$$$$$$$$$$$3$C>- -r<   rV  c                     a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R# t%R$ t&R% t'R& t(R' t)R( t*R) t+R* t,R+ t-R, t.]/P`                  ! 4       ]1Pd                  ! R-4      R. 4       4       t3R/ t4R0 t5R1 t6R2 t7R3 t8R4 t9R5 t:R6 t;R7 t<R8 t=R9 t>R: t?R; t@R< tAR= tBR>tCV tDR?# )@TestMiscellaneousi   c                B   \        R RR7      ;_uu_ 4       pVP                  4       pRRR4       \        P                  ! X4      p\	        4       p\        V^ R7      pVP                  V4       V P                  W$P                  4       4       R#   + '       g   i     Lo; i)r   rZ   r   Nr	  	r'   r   r   r  r   r   r   r2   r   r6   r   r   r8   r   r   s   &     r9   test_message_from_string*TestMiscellaneous.test_message_from_string  sn    lW55779D 6''-J aa(			#zz|, 65s   BB	c                f   \        R RR7      ;_uu_ 4       pVP                  4       pVP                  ^ 4       \        P                  ! V4      p\        4       p\        V^ R7      pVP                  V4       V P                  W$P                  4       4       RRR4       R#   + '       g   i     R# ; i)r   rZ   r   r	  N)
r'   r   seekr   r$  r   r   r   r2   r   r  s   &     r9   test_message_from_file(TestMiscellaneous.test_message_from_file  sz    lW55779DGGAJ))"-C
A !!,AIIcNT::<0 6555s   A?BB0	c                   \        R RR7      ;_uu_ 4       pVP                  4       pRRR4        ! R R\        4      p\        P                  ! XV4      pV P                  WC4       \        RRR7      ;_uu_ 4       pVP                  4       pRRR4       \        P                  ! W#4      pVP                  4        F  pV P                  WS4       K  	  R#   + '       g   i     L; i  + '       g   i     Lc; i)r   rZ   r   Nc                       ] tR tRtRtR# )HTestMiscellaneous.test_message_from_string_with_class.<locals>.MyMessagei  rX  NrY  rZ  r[  r\  r]  rX  r<   r9   	MyMessager        r<   r  rm  )r'   r   r   r   r  r  walk)r6   r   r   r  r8   r   s   &     r9   #test_message_from_string_with_class5TestMiscellaneous.test_message_from_string_with_class  s    lW55779D 6	 	 ''i8c-lW55779D 6''8xxzG!!'5 " 65 65s   C;C'C$	'C7	c                    ! R  R\         4      p\        RRR7      ;_uu_ 4       p\        P                  ! W!4      pRRR4       V P	                  XV4       \        RRR7      ;_uu_ 4       p\        P                  ! W!4      pRRR4       VP                  4        F  pV P	                  WA4       K  	  R#   + '       g   i     L; i  + '       g   i     LM; i)c                       ] tR tRtRtR# )FTestMiscellaneous.test_message_from_file_with_class.<locals>.MyMessagei+  rX  Nr  rX  r<   r9   r  r  +  r  r<   r  r   rZ   r   Nrm  )r   r'   r   r$  r  r  )r6   r  r   r8   r   s   &    r9   !test_message_from_file_with_class3TestMiscellaneous.test_message_from_file_with_class)  s    	 	 lW55))"8C 6c9-lW55))"8C 6xxzG!!'5 " 65 65s   B4+C4C	C	c                j     ! R  R\         4      pV P                  RV4      pV P                  W!4       R# )c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )STestMiscellaneous.test_custom_message_does_not_require_arguments.<locals>.MyMessagei8  c                $   < \         SV `  4        R # rm   )super__init__)r6   	__class__s   &r9   r  \TestMiscellaneous.test_custom_message_does_not_require_arguments.<locals>.MyMessage.__init__9  s     "r<   rX  )rY  rZ  r[  r\  r  r]  r^  __classcell__)r  r`  s   @@r9   r  r  8  s     # #r<   r  zSubject: test

testN)r   rb  r  )r6   r  r8   s   &  r9   .test_custom_message_does_not_require_arguments@TestMiscellaneous.test_custom_message_does_not_require_arguments7  s/    	# 	# mm3Y?c-r<   c                j    \        R 4      pV P                  \        VP                  4      . RO4       R# )r   N)r   rB   r   r    
feedparserr   r   r!   r  message_from_binary_filer   r$  r  rf  r   r"   r#   )
__import__r2   sorted__all__)r6   modules   & r9   test__all__TestMiscellaneous.test__all__>  s*    G$/ 2 	r<   c                    \         P                   ! 4       pV P                  \        P                  ! \        P                  ! V4      4      R ,          \         P
                  ! V4      R ,          4       R# )N   NN)r  r2   r#   	parsedate
formatdategmtimer6   r  s   & r9   test_formatdate!TestMiscellaneous.test_formatdateH  sG    iik)9)9#)>?CS)"-	/r<   c           	         \         P                   ! 4       pV P                  \        P                  ! \        P                  ! VR R7      4      R,          \         P
                  ! V4      R,          4       R# )Tr  r  N)r  r2   r#   r  r  r  r  s   & r9   test_formatdate_localtime+TestMiscellaneous.test_formatdate_localtimeM  sJ    iikOOE,,SDAB2FNN3#	%r<   c           	     v   \         P                   ! 4       pV P                  \        P                  ! VR R7      \         P                  ! R\         P
                  ! V4      4      4       V P                  \        P                  ! VR RR7      \         P                  ! R\         P
                  ! V4      4      4       R# )Fr  z%a, %d %b %Y %H:%M:%S -0000T)r  usegmtz%a, %d %b %Y %H:%M:%S GMTN)r  r2   r#   r  r  r  r  s   & r9   test_formatdate_usegmt(TestMiscellaneous.test_formatdate_usegmtS  s    iikSE2MM7S9IJ	L 	SE$?MM5t{{37GH	Jr<   c                   . ROpV Fp  pV P                  VR7      ;_uu_ 4        V P                  \        P                  ! V4      4       V P                  \        P                  ! V4      4       RRR4       Kr  	  V P                  \        P                  ! R4      4       V P                  \        P                  ! R4      4       R#   + '       g   i     K  ; i)r+   )dtstrN)	r+   r,   0zA Complete Waste of Timez Wed, 3 Apr 2002 12.34.56.78+0800z17 June , 2022zFriday, -Nov-82 16:14:55 ESTzFriday, Nov--82 16:14:55 ESTzFriday, 19-Nov- 16:14:55 EST)r%  r  r#   r  parsedate_tz)r6   invalid_datesr  s   &  r9   /test_parsedate_returns_None_for_invalid_stringsATestMiscellaneous.test_parsedate_returns_None_for_invalid_strings]  s    

 #EE**!!%//%"89!!%"4"4U";< +* #
 	%//$/0%,,T23 +**s   ACCc                    V P                  \        P                  ! R 4      R4       V P                  \        P                  ! R4      R4       V P                  \        P                  ! R4      R4       R# )zWed, 3 Apr 2002 14:58:26 +0800zWed,3 Apr 2002 14:58:26 +0800zWed 3 Apr 2002 14:58:26 +0800N
           :      r   r   r  p  r2   r#   r  r?  s   &r9   test_parsedate_compact(TestMiscellaneous.test_parsedate_compacts  sf    ++,LMB	D 	++,KLB	D 	++,KLB	Dr<   c                    V P                   pV! \        P                  ! R 4      R4       V! \        P                  ! R4      R4       R# )5 Feb 2003 13:47:26 -0800zFebruary 5, 2003 13:47:26 -0800N
           /   r  r   r   r  透r  r6   r7   s   & r9   test_parsedate_no_dayofweek-TestMiscellaneous.test_parsedate_no_dayofweek}  s?    
59:5	7
5?@5	7r<   c                R    V P                  \        P                  ! R 4      R4       R# )zWed, 3 Apr 2002 14:58:26+0800Nr  r  r?  s   &r9   .test_parsedate_no_space_before_positive_offset@TestMiscellaneous.test_parsedate_no_space_before_positive_offset  s!    ++,KL4	6r<   c                R    V P                  \        P                  ! R 4      R4       R# )zWed, 3 Apr 2002 14:58:26-0800N)
r  r  r  r  r  r  r   r   r  r  r  r?  s   &r9   .test_parsedate_no_space_before_negative_offset@TestMiscellaneous.test_parsedate_no_space_before_negative_offset  s!    ++,KL5	7r<   c                    V P                   pV! \        P                  ! R 4      R4       V! \        P                  ! R4      R4       R# )z5 Feb 2003 13.47.26 -0800z5 Feb 2003 13.47 -0800Nr  )
r  r  r  r  r  r   r   r   r  r  r  r	  s   & r9   %test_parsedate_accepts_time_with_dots7TestMiscellaneous.test_parsedate_accepts_time_with_dots  s?    
59:5	7
5674	6r<   c                R    V P                  \        P                  ! R 4      R4       R# )zFriday, 19-Nov-82 16:14:55 ESTN)
i           r  7   r   r   r  ir  r?  s   &r9   test_parsedate_rfc_850(TestMiscellaneous.test_parsedate_rfc_850  s!    ++,LM7	9r<   c                R    V P                  \        P                  ! R 4      R4       R# )zWed, 3 Apr 2002 14:58 +0800N
r  r  r  r  r  r   r   r   r  r  r  r?  s   &r9   test_parsedate_no_seconds+TestMiscellaneous.test_parsedate_no_seconds  s"    ++,IJA	Cr<   c                    V P                  \        P                  ! R 4      R4       V P                  \        P                  ! R4      R4       R# )zWed, 3 Apr 2002 14.58.26 +0800zWed, 3 Apr 2002 14.58 +0800Nr  r  r  r?  s   &r9   !test_parsedate_dot_time_delimiter3TestMiscellaneous.test_parsedate_dot_time_delimiter  sB    ++,LMB	D++,IJA	Cr<   c           	     V   V P                   p\        P                  ! R 4      p\        \        P
                  ! V4      4      pV! \        P                  ! V4      R,          VR,          4       V! \        \        P                  ! RV4      4      R4       \        P                  ! R 4      p\        \        P
                  ! VR,          4      4      pV! \        P                  ! V4      R,          VR,          4       V! \        \        P                  ! RVR,          4      4      R4       R# )r  r  z%Yr  :N	   NN)	r2   r#   r  intr  mktimer  r  r  )r6   r7   timetupr-  s   &   r9   +test_parsedate_acceptable_to_time_functions=TestMiscellaneous.test_parsedate_acceptable_to_time_functions  s    //"=>G$%
4>>!R '"+.
3t}}T7+,d3$$%@AGBK()
4>>!R '"+.
3t}}T72;/0$7r<   c                    V P                  \        P                  ! R4      ^ 4       V P                  \        P                  ! R4      R4       R# )  N)
r+  r   r   r   r   r   r  r  r  r   )
r+  r   r   r   r   r   r  r  r  i  i.)r2   r#   	mktime_tzr?  s   &r9   test_mktime_tz TestMiscellaneous.test_mktime_tz  sE     *9 :;<	> *< =>C	Er<   c                    V P                  \        P                  ! R 4      \        P                  ! R4      4       V P                  \        P                  ! R4      \        P                  ! R4      4       R# )z25 Feb 03 13:47:26 -0800z25 Feb 2003 13:47:26 -0800z25 Feb 71 13:47:26 -0800z25 Feb 1971 13:47:26 -0800Nr  r?  s   &r9   test_parsedate_y2k$TestMiscellaneous.test_parsedate_y2k  s\     	++,FG++,HI	K++,FG++,HI	Kr<   c                    V P                  \        P                  ! R 4      R4       V P                  \        P                  ! \        P                  ! R 4      4      R4       R# )z<>r+   Nr+   r+   r2   r#   	parseaddr
formataddrr?  s   &r9   test_parseaddr_empty&TestMiscellaneous.test_parseaddr_empty  s?    .9))%//$*?@"Er<   c                    V P                  \        P                  ! R 4      R4       V P                  \        P                  ! R4      R4       V P                  \        P                  ! R4      R4       R# )za@b@cza@b.c@cza@172.17.0.1@cNr3  r2   r#   r5  r?  s   &r9   test_parseaddr_multiple_domains1TestMiscellaneous.test_parseaddr_multiple_domains  s^    OOG$	
 	OOI&	
 	OO,-	
r<   c                R    V P                  \        P                  ! R4      R4       R# )A Silly PersonzA Silly Person <person@dom.ain>N)r>  person@dom.ainr2   r#   r6  r?  s   &r9   test_noquote_dump#TestMiscellaneous.test_noquote_dump  s"    AB-	/r<   c                   V P                  \        P                  ! R4      R4       V P                  \        P                  ! R4      R4       RpRpV P                  \        P                  ! \        P                  ! W34      4      W34       R# )A (Very) Silly Personr?  z("A (Very) Silly Person" <person@dom.ain>z*"A \(Very\) Silly Person" <person@dom.ain>zA \(Special\) PersonN)rD  r?  r2   r#   r6  r5  r6   r  rQ  s   &  r9   test_escape_dump"TestMiscellaneous.test_escape_dump  sv    HI7	9 	OOIJ7	9 $)9)91&)ABQFKr<   c                    V P                  \        P                  ! R4      R4       R pRpV P                  \        P                  ! \        P                  ! W34      4      W34       R# )Arthur \Backslash\ Foobarr?  z."Arthur \\Backslash\\ Foobar" <person@dom.ain>N)rJ  r?  rE  rF  s   &  r9   test_escape_backslashes)TestMiscellaneous.test_escape_backslashes  sV    MN=	? ))9)91&)ABQFKr<   c                    R pRpRpRpV P                  \        P                  ! W34      V4       V P                  \        P                  ! W3R4      V4       R# )   Häns Würstr?  -=?utf-8?b?SMOkbnMgV8O8cnN0?= <person@dom.ain>z0=?iso-8859-1?q?H=E4ns_W=FCrst?= <person@dom.ain>r>   Nr@  )r6   rJ  addrutf8_base64latin1_quopris   &    r9   test_quotes_unicode_names+TestMiscellaneous.test_quotes_unicode_names  sU    %EJ))4,7E))4,E	r<   c                  a R pRpRpRo ! V3R lR4      pV! 4       pS: RV: R2pV P                  \        P                  ! W3V4      V4       V P                  \        P                  ! W3\        R4      4      V4       R	# )
rN  r?  rO  FOOBARc                   .   <a  ] tR tRt o V3R ltRtV tR# )KTestMiscellaneous.test_accepts_any_charset_like_object.<locals>.CharsetMocki  c                   < S# rm   rX  )r6   stringr  s   &&r9   header_encodeYTestMiscellaneous.test_accepts_any_charset_like_object.<locals>.CharsetMock.header_encode  s    r<   rX  N)rY  rZ  r[  r\  r[  r]  r^  )r`  r  s   @r9   CharsetMockrX    s      r<   r]  z <>rZ   N)r2   r#   r6  r
   )r6   rJ  rP  rQ  r]  mockmock_expectedr  s   &      @r9   $test_accepts_any_charset_like_object6TestMiscellaneous.test_accepts_any_charset_like_object  sz    %E	 	 }%+T2))4,=}M))4,8HI	r<   c                p    R pRp\        4       pV P                  \        \        P                  W3V4       R# )rN  r?  N)objectr   AttributeErrorr#   r6  )r6   rJ  rP  bad_charsets   &   r9   -test_invalid_charset_like_object_raises_error?TestMiscellaneous.test_invalid_charset_like_object_raises_error  s2    %h.%*:*:TL	r<   c                    R pV P                  \        \        P                  RV34       V P                  \        \        P                  RV34       R# )u   persön@dom.inNName)r   UnicodeErrorr#   r6  r6   rP  s   & r9   !test_unicode_address_raises_error3TestMiscellaneous.test_unicode_address_raises_error  s?    #,(8(84,G,(8(864.Ir<   c                    R pRpRRrCV P                  \        P                  ! V4      W434       V P                  \        P                  ! V4      W434       V P                  \        P                  ! W434      V4       R# )zJohn X. Doe <jxd@example.com>z"John X. Doe" <jxd@example.com>zJohn X. Doezjxd@example.comNr4  )r6   r  yr  rQ  s   &    r9   test_name_with_dot$TestMiscellaneous.test_name_with_dot  sg    +-01+aV4+aV4))1&115r<   c                    V P                   pV! \        P                  ! R 4      R4       V! \        P                  ! R4      R4       V! \        P                  ! R4      R4       R# )""example" example"@example.com!"\"example\" example"@example.com#"\\"example\\" example"@example.comN)r+   rt  )r+   ru  )r+   rv  r:  r	  s   & r9   2test_parseaddr_preserves_quoted_pairs_in_addressesDTestMiscellaneous.test_parseaddr_preserves_quoted_pairs_in_addresses  sT     
5??<=
1	3
5??@A
5	7
5??DE
9	;r<   c                   V P                  R\        P                  ! R4      4       V P                  R\        P                  ! R4      4       V P                  R\        P                  ! R4      4       V P                  R	\        P                  ! R4      4       V P                  R
\        P                  ! R4      4       R# )r+   merwok wok@xample.commerwok  wok@xample.comz merwok  wok  @xample.commerwok"wok"  wok@xample.comzmerwok. wok .  wok@xample.comN)r+   rz  )r+   r{  )r+   r|  )r+   zmerwok.wok.wok@xample.comr:  r?  s   &r9   -test_parseaddr_preserves_spaces_in_local_part?TestMiscellaneous.test_parseaddr_preserves_spaces_in_local_part-  s     	6OO34	67OO45	77OO78	:<OO9:	<:OO;<	>r<   c                    RpRpV P                  \        P                  ! V4      V4       V P                  \        P                  ! V4      V4       R# )#'foo@example.com' (foo@example.com)z7"'foo@example.com' (foo@example.com)" <foo@example.com>N)r  foo@example.comr4  )r6   rP  addrstrs   &  r9   6test_formataddr_does_not_quote_parens_in_quoted_stringHTestMiscellaneous.test_formataddr_does_not_quote_parens_in_quoted_string?  sE    #C148))$/9r<   c                V    R pV P                  \        P                  ! V4      R4       R# )zFoo
	Bar <foo@example.com>N)zFoo Barr  r:  )r6   r  s   & r9   test_multiline_from_comment-TestMiscellaneous.test_multiline_from_commentH  s%     	+-KLr<   c                R    V P                  \        P                  ! R4      R4       R# )A Silly; Personz""A Silly; Person" <person@dom.ain>N)r  r?  r@  r?  s   &r9   test_quote_dump!TestMiscellaneous.test_quote_dumpN  s"    BC1	3r<   c                V   V P                   pV P                  p\        4       p\        4       pV! VR 4       V! VR4       V! VR4       V! R V4       V! RV4       V! RV4       V! VR4       V! VR4       V! VR4       V! RV4       V! RV4       V! RV4       V! W44       V! WC4       R# )rP   US-ASCIIzUs-AsCiIusasciiUSASCIIUsAsCiIN)r2   assertNotEqualr
   )r6   r7   necset1cset2s   &    r9   test_charset_richcomparisons.TestMiscellaneous.test_charset_richcomparisonsS  s      		
5*
5*
5*
:u
:u
:u
5)
5)
5)
9e
9e
9e
5
5r<   c                `    V P                   pV! \        P                  ! R R.4      RR.4       R# )aperson@dom.ain (Al Person)zBud Person <bperson@dom.ain>Nz	Al Personr  )z
Bud Personr  r2   r#   getaddressesr	  s   & r9   test_getaddresses#TestMiscellaneous.test_getaddressesg  s9    
5<=? @,-/	0r<   c                Z    V P                  \        P                  ! . RO4      . RO4       R# )"Bud, Person" <bperson@dom.ain>N)r  r  z#"Mariusz Felisiak" <to@example.com>))zBud, Personr  r  )zMariusz Felisiakto@example.comr  r?  s   &r9   test_getaddresses_comma_in_name1TestMiscellaneous.test_getaddresses_comma_in_namen  s(    	
r<   c                	   R pRpRpRRV R2V3.3RRV3VRV3.3RRV3VRV3V.3RRV3VRV3.3RRV RV R	23.3R
RV3VRV3.3RW3RV3.3RRV3VRV3.3RRV3RV3.3RRVR,           3RV3.3RRV3RRV R23.33 F  w  rEV V RV R2pV P                  VR7      ;_uu_ 4        V P                  \        P                  ! V.4      V.4       V P                  \        P                  ! V.RR7      V4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       RRR4       K  	  V RV R2pV P                  \        P                  ! V.4      RV3RV3.4       V P                  \        P                  ! V.RR7      RV3RV3.4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       RpRpV P                  \        P                  ! V.4      V.4       V P                  \        P                  ! V.RR7      V.4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       RpRpV P                  \        P                  ! V.4      V.4       V P                  \        P                  ! V.RR7      V.4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       RpV P                  \        P                  ! V.4      V.4       V P                  \        P                  ! V.RR7      . RO4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       RpV P                  \        P                  ! V.4      RR.4       V P                  \        P                  ! V.RR7      RR.4       V P                  \        P                  ! V.4      V4       V P                  \        P                  ! V.RR7      RV34       V P                  \
        P                  P                  R4       R#   + '       g   i     EKl  ; i) alice@example.orgbob@example.comr+   (<r^  )[z[<z>]]@;:.")addressFstrictNz,<z,"Alice, alice@example.org" <bob@example.com>zalice@example.org (Alice)zalice@example.org )Alice(<"Jane Doe" <jane@example.net>, "John Doe" <john@example.net>Tr3  )zAlice, alice@example.orgr  )Alicer  ))r+   r  r3  )r+   r  )zJane Doezjane@example.net)zJohn Doezjohn@example.net)r%  r2   r#   r  r5  r   supports_strict_parsing)r6   alicebobemptyinvalid_separatorexpected_non_strictr  expected_stricts   &       r9   test_parsing_errors%TestMiscellaneous.test_parsing_errors  s   # auAJ&'(B;Cy12B;Cy%89B;Cy12B5'C5+,-.B;Cy125"c+,B;Cy12B;S	*+B$r3i01B;qQZ 0127
2  12!C5:Gg..  !3!3WI!>"'*  !3!3WIe!L!46   '!;!&(  '5!I"$g0 /.7
6 G2cU!$++WI6u+Cy1	3++WIeDu+Cy1	3'3	 '5Ag	( AI++WI68IJ++WIeDFWX'3_E'5Ag	( .8++WI68IJ++WIeDFWX'3_E'5Ag	( .++WI6@++WIeDM	O'3U;'5Ag	( Q++WI6::<	= 	++WIeD::<	= 	'3U;'5Ag	( 	<<dC /..s   (B$SS+c                :   R .R.3R.R.3RR.RR.3R.R.3R.R.3R.. RO3R.R.3R.R.3R.R.3R	.RR.33
 Fv  w  rV P                  VR
7      ;_uu_ 4        V P                  \        P                  ! V4      V4       V P                  \        P                  ! VRR7      V4       RRR4       Kx  	  R.pV P                  \        P                  ! V4      R.4       V P                  \        P                  ! VRR7      . RO4       R#   + '       g   i     K  ; i)u&   "Sürname, Firstname" <to@example.com>zfoo: ;z#"Jason R. Mastaler" <jason@dom.ain>z=Pete(A nice \) chap) <pete(his account)@silly.test(his host)>z<(Empty list)(start)Undisclosed recipients  :(nobody(I know))z=Mary <@machine.tld:mary@example.net>, , jdoe@test   . examplez*John Doe <jdoe@machine(comment).  example>z3"Mary Smith: Personal Account" <smith@home.example>zUndisclosed recipients:;z7<boss@nil.test>, "Giant; \"Big\" Box" <bob@example.net>)	addressesFr  Nz	[]*-- =~$)u   Sürname, Firstnamer  r3  )zJason R. Mastalerzjason@dom.ain)z)Pete (A nice ) chap his account his host)zpete@silly.test))Maryzmary@example.netr3  )r+   zjdoe@test.example)zJohn Doe (comment)zjdoe@machine.example)zMary Smith: Personal Accountzsmith@home.example)r+   zboss@nil.test)zGiant; "Big" Boxzbob@example.net)r3  r3  )r+   z*--)r%  r2   r#   r  )r6   r  r  s   &  r9   test_getaddresses_nasty)TestMiscellaneous.test_getaddresses_nasty  s   6778: ZZ =>>?A OONOQ MMZ NNPR ;;<=? DDDEG ))Z II#%LMO9$
I> 	22  !3!3I!>!)+  !3!3Ie!L!)+ 32?$
J !M	++I6"	%++IeD:	< 322s   AD		Dc                z    V P                   p\        P                  ! R .4      pV! V^ ,          ^,          R4       R# )z%User ((nested comment)) <foo@bar.com>foo@bar.comNr  )r6   r7   addrss   &  r9   "test_getaddresses_embedded_comment4TestMiscellaneous.test_getaddresses_embedded_comment  s3    ""$K#LM
58A;&r<   c                    \         P                  ! \        R 4      .4      pV P                  V^ ,          ^,          R4       R# )zAl Person <aperson@dom.ain>r  N)r#   r  r   r2   )r6   r  s   & r9   test_getaddresses_header_obj.TestMiscellaneous.test_getaddresses_header_obj	  s4    ""F+H$I#JKq!&78r<   cpuc                    ! R  R\         4      p\        ^4       Uu. uF	  q!! 4       NK  	  pp\        P                  ! V4      ;_uu_ 4         RRR4       \	        V Uu. uF  qDP
                  NK  	  up. 4      pV P                  \        \        V4      4      \        V4      4       R# u upi   + '       g   i     Li; iu upi )c                   &   a  ] tR tRt o R tRtV tR# )BTestMiscellaneous.test_make_msgid_collisions.<locals>.MsgidsThreadi  c                    . V n         V P                   P                  p\        P                  p\        P
                  pV! 4       R ,           pV! 4       V8  d   V! V! RR7      4       K  R# )g      @testdomain-stringdomainN)msgidsr  r#   
make_msgidr  	monotonic)r6   r  r  clocktfins   &    r9   runFTestMiscellaneous.test_make_msgid_collisions.<locals>.MsgidsThread.run  sS     ++"--
w}gn:-@AB %r<   )r  N)rY  rZ  r[  r\  r  r]  r^  r_  s   @r9   MsgidsThreadr    s     C Cr<   r  N)	r   r  r%   start_threadssumr  r2   rj  set)r6   r  r  threadsr-  all_idss   &     r9   test_make_msgid_collisions,TestMiscellaneous.test_make_msgid_collisions  s    		C6 		C ,1848a<>84++G44 51Axx126S\*CL9	 5441s   B*B/C/B?	c                    V P                   p\        4       pVP                  R RRR7       V! VP                  4       R4       R# )ru  rr  zfoo\wacky"namert  N)r2   r   rw  r   r5   s   &  r9   test_utils_quote_unquote*TestMiscellaneous.test_utils_quote_unquote#  sA    i,l 1 	 	3
301r<   c                \    \        R 4      pV P                  VP                  4       R4       R# )znot a charsetr[   Nr
   r2   get_body_encodingr6   rB   s   & r9   )test_get_body_encoding_with_bogus_charset;TestMiscellaneous.test_get_body_encoding_with_bogus_charset*  s%    /*224h?r<   c                   V P                   p\        4       pR VR&   V! VR,          R 4       VP                  4       pV! \        V4      ^4       V! V^ ,          R4       \	        V^ ,          4      pV! VP                  4       R4       VP                  RVR7       V! VP                  4       R4       V! VP                  RR	7      R4       V! VR
,          R4       \        4       pRVR&   VP                  4       pV! \        V4      ^4       V! V^ ,          R4       \	        V^ ,          4      pV! VP                  4       \        P                  4       VP                  RVR7       V! VP                  4       R4       V! VR
,          R4       R# )ztext/plain; charset=UTF-8rE   rA   rZ   r[   r   r~  aGVsbG8gd29ybGQ=
Tr\   rC   ztext/plain; charset="US-ASCII"rP   ru  rq  N)
r2   r   r~   rj  r
   r  rU   r^   r   r  )r6   r7   r8   r   rB   s   &    r9   -test_get_body_encoding_with_uppercase_charset?TestMiscellaneous.test_get_body_encoding_with_uppercase_charset.  sS   i9N
3~ ;<##%
3x=!
8A; (1+&
7$$&18
3??23
3??$?'8
3*+X6i>N##%
3x=!
8A;
#(1+&
7$$&(?(?@w7
3??m,
3*+V4r<   c                    \        R 4      p\        R4      pV P                  VP                  4       VP                  4       4       R# )rP   r  Nr  )r6   lcucs   &  r9   test_charsets_case_insensitive0TestMiscellaneous.test_charsets_case_insensitiveH  s8    Z Z --/1E1E1GHr<   c                    V P                   pV P                  R 4      p\        4       p\        P                  ! W#4       V! VP                  4       R4       R# )r  aB  multipart/report
    text/plain
    message/delivery-status
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
        text/plain
    text/rfc822-headers
Nr9  r;  s   &   r9   1test_partial_falls_inside_message_delivery_statusCTestMiscellaneous.test_partial_falls_inside_message_delivery_statusM  sG    ""
 ll<(jS&
3<<>  	r<   c                l    V P                  \        P                  P                  R R7      RR R4       R# )r  r  Nz@testdomain-string>ir2   r   r#   r  r?  s   &r9   test_make_msgid_domain(TestMiscellaneous.test_make_msgid_domainw  s0    KK""*=">stD!	#r<   c                n    V P                  \        P                  P                  R RR7      RR R4       R# )ztest-idstringr  )idstringr  Nz!.test-idstring@testdomain-string>ir  r?  s   &r9   test_make_msgid_idstring*TestMiscellaneous.test_make_msgid_idstring|  s9    KK""O* # ,,/D2/	1r<   c                    \        R 4      ;_uu_ 4       pR;Vn        pV P                  \        P                  P                  4       RV,           R,           4       RRR4       R#   + '       g   i     R# ; i)zsocket.getfqdnzpythontest.example.comr  r^  N)r	   return_valueassertEndsWithr   r#   r  )r6   mock_getfqdnr  s   &  r9   test_make_msgid_default_domain0TestMiscellaneous.test_make_msgid_default_domain  sR    #$$1IIL% 6 6 8#,:LM %$$$s   AA$$A5	c                   \        R RRR7      ;_uu_ 4       pVP                  4       pRRR4       XP                  RR4      p\        P                  ! V4      p\        4       p\        P                  P                  V4      pVP                  V4       V P                  VP                  4       V4       R#   + '       g   i     L; i)
msg_26.txtrZ   r*   r   newlineNr   )r'   r   r  r   r  r   r   r   r   r2   r   r6   fmsgtxt	msgtxt_nlr8   r   r   s   &      r9   test_Generator_linend'TestMiscellaneous.test_Generator_linend  s    lWdCCqVVXF DNN640	''/JOO%%a(			#y1 DCs   B44C	c                   \        R RRR7      ;_uu_ 4       pVP                  4       pRRR4       XP                  RR4      p\        P                  ! V4      p\        4       p\        P                  P                  V4      pVP                  VRR7       V P                  VP                  4       P                  R4      V4       R#   + '       g   i     L; i)r  rZ   r*   r  Nr   r   r   )r'   r   r  r   r  r   r   r   r   r2   r   r]   r	  s   &      r9   test_BytesGenerator_linend,TestMiscellaneous.test_BytesGenerator_linend  s    lWdCCqVVXF DNN640	''	2IOO**1-			#v	&,,W5v> DCs   CC	c                   \        R R4      ;_uu_ 4       pVP                  4       pRRR4       XP                  RR4      pVP                  RR4      p\        P                  ! V4      p\        4       p\        P                  P                  V4      pVP                  VRR7       V P                  VP                  4       V4       R#   + '       g   i     L; i)	r  re  Ns   with attachments   fo   
r  r   r   )r'   r   r  r   r   r   r   r   r   r2   r   r	  s   &      r9   )test_BytesGenerator_linend_with_non_ascii;TestMiscellaneous.test_BytesGenerator_linend_with_non_ascii  s    lD))QVVXF * 2I>NN7E2	&&y1IOO**1-			#v	&v. *)s   CC	c                   \        R R4      ;_uu_ 4       pVP                  4       pRRR4       \        RR4      ;_uu_ 4       pVP                  4       pRRR4       \        R3\        X33\        X33\
        \        4       33\        R	3\        R3.pV F  w  rVV P                  VP                  RR7      ;_uu_ 4        V! V!  pV P                  VP                  \        P                  P                  4       RRR4       V P                  VP                  RR7      ;_uu_ 4        V! VR\        P                  P                  / pV P                  VP                  \        P                  P                  4       RRR4       K  	  R#   + '       g   i     ELl; i  + '       g   i     ELS; i  + '       g   i     L; i  + '       g   i     EKB  ; i)
rv  re  Nrd  r  )clsr   r  r   )r+   )r  r  )r'   r   r   r   r   r   r   r   r   r%  rY  rz  r   r   r  r  )r6   r   	audiodatark  classesr  constructorr   s   &       r9   !test_mime_classes_policy_argument3TestMiscellaneous.test_mime_classes_policy_argument  sX   k4((B	I )lD))RggiG * e$%
#79,'56u
 !(C#,,zBB%ahh(=(=> C #,,yAABU\\-A-ABahh(<(<= BA	 !( )(())) CB BAAs0   F	F>;F1&AG	F	F.	1GGc                    V P                  \        \        P                  ! R 4      4      . RO4       V P                  \        \        P                  ! R4      4      RR.4       R# )za\\b\"c\\"dza\Nr   r  )r  )r  \\)r  rQ  )r  z\")r  c)   r  )r$  r  )
   d)r   \)r2   r  r#   _iter_escaped_charsr?  s   &r9   test_iter_escaped_chars)TestMiscellaneous.test_iter_escaped_chars  sQ    e77GH%	& 	e77>?"I.	0r<   c                  a  V 3R  lpV! RR4       V! RR4       V! RR4       V! RR4       V! R	R
4       V! RR4       V! RR4       V! RR4       R F)  pS P                  \        P                  ! V4      V4       K+  	  R# )c                 T   < SP                  \        P                  ! V 4      V4       R # rm   r2   r#   _strip_quoted_realnames)rP  r  r6   s   &&r9   check<TestMiscellaneous.test_strip_quoted_realnames.<locals>.check  s    U::4@(Kr<   r  z( <jane@example.net>,  <john@example.net>z""Jane \"Doe\"." <jane@example.net>z <jane@example.net>zbefore"name"afterbeforeafterzbefore"name"beforezb"name"rQ  z"name"afterafterz"name"ar  z"name"r+   N)z8Jane Doe <jane@example.net>, John Doe <john@example.net>zlone " quoter*  )r6   r,  rP  s   f  r9   test_strip_quoted_realnames-TestMiscellaneous.test_strip_quoted_realnames  s    	L 	L8	:3#	% 	"M2ox(j#ng&j#i
D U::4@$G	
r<   c                   R pV P                  \        P                  ! V R24      4       V P                  \        P                  ! V R24      4       V P                  \        P                  ! V R24      4       V P                  \        P                  ! V R24      4       V P                  \        P                  ! RV 24      4       R# )zalice@example.netz (Alice)z )Alice(z	 (Alice))z	 ((Alice)z")Alice((" N)r   r#   _check_parenthesisr  rl  s   & r9   test_check_parenthesis(TestMiscellaneous.test_check_parenthesis  s    "00D61BCD11TF(2CDE11TF)2DEF11TF)2DEF 	00;tf1EFGr<   rX  N)ErY  rZ  r[  r\  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r!  r(  r-  r0  r7  r;  rA  rG  rK  rS  ra  rg  rm  rq  rw  r}  r  r  r  r  r  r  r  r  r  r  r%   requires_working_threadingr$   requires_resourcer  r  r  r  r  r  r  r  r  r  r  r  r  r&  r1  r5  r]  r^  r_  s   @r9   r  r     sr    	-
16"6./
%J4,D767
69CC	8EKF
/
	LLJ6;$>$:M3
(0
"VDp*<X'9
 002u%: & 3:&2@54I
(T#
1N
	2	?
/>*0H2H Hr<   r  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestIteratorsi  c                R   V P                   pV P                  pV P                  R 4      p\        P                  ! V4      p\        V4      pV! \        V4      ^4       V! \        P                  V4      VP                  4       4       V P                  R4      p\        P                  ! V4      p\        V4      pV! \        V4      ^+4       \        RRR7      ;_uu_ 4       pV! \        P                  V4      VP                  4       4       RRR4       R#   + '       g   i     R# ; i)r   rm  z
msg_19.txtrZ   r   N)r2   r  r3   r!   body_line_iteratorr  rj  EMPTYSTRINGr   r^   r'   r   )r6   r7   rr  r8   itr   r   s   &      r9   test_body_line_iterator%TestIterators.test_body_line_iterator  s    ##ll<())#.R
3u:qKU#S__%67ll<())#.R
3u:rlW55  '3 6555s    +DD&	c                "   V P                   pV P                  R 4      p\        P                  ! VR4      p. p^ pV F+  pV^,          pVP	                  VP                  4       4       K-  	  V! V^4       V! \        P                  V4      R4       R# )r   r   z`a simple kind of mirror
to reflect upon our own
a simple kind of mirror
to reflect upon our own
Nr2   r3   r!   typed_subpart_iteratorr  r^   r=  r   r6   r7   r8   r>  r   subpartsr   s   &      r9   test_typed_subpart_iterator)TestIterators.test_typed_subpart_iterator  s    ll<(--c6:GMHLL,,./  	8Q
;E" % 	r<   c                $   V P                   pV P                  R 4      p\        P                  ! VRR4      p. p^ pV F+  pV^,          pVP	                  VP                  4       4       K-  	  V! V^4       V! \        P                  V4      R4       R# )r   r   r  z%
Hi,

Do you like this message?

-Me
NrB  rD  s   &      r9   (test_typed_subpart_iterator_default_type6TestIterators.test_typed_subpart_iterator_default_type  s    ll<(--c67CGMHLL,,./  	8Q
;E" % 	r<   c           
        . ROp^ RI HpHp V! 4       p. p^ pV Fh  w  rxVP                  V4       Wh,          p^ p	\	        VP
                  V4       F  p
VP                  V
4       V	^,          p	K  	  V P                  W4       Kj  	  V P                  \        V4      V4       T P                  RP                  V UUu. uF  w  rxVNK	  	  upp4      RP                  V4      4       R# u uppi )a 
r+   BufferedSubFileNeedMoreDataN))rL  r  )rQ  r   )zc
r   )r+   r   )zd
r   )zer   )z
fr   )r   r   )
email.feedparserrN  rO  pushiterreadliner  r2   rj  r   )r6   imtrN  rO  bsfomntilnn1ols   &          r9   test_pushCR_LFTestIterators.test_pushCR_LF&  s    
	 	CEBHHRLGBB3<<6		"a 7 Q#  	R"%#!6#"#!67E!6s   <C'c                  a ^ RI HpHp Rp^pRoRP                  V3R l\	        V4       4       4      R,           pVP                  R4      pV! 4       p. p\	        ^ \        V4      V4       FC  p	WYW,            p
VP                  V
4       VP                  \        VP                  V4      4       KE  	  V P                  W4       R# )	r   rM  i'  zabcd 	
r+   c              3   :   <"   T F  p\        S4      x  K  	  R # 5irm   r   )r  r  charss   & r9   r  1TestIterators.test_push_random.<locals>.<genexpr>K  s     48aF5MM8s   r*   TN)rP  rN  rO  r   r  r  rj  rQ  extendrR  rS  r2   )r6   rN  rO  rY  	chunksizer   targetrU  r   r  chunkr`  s   &          @r9   test_push_randomTestIterators.test_push_randomD  s    B	GG45844t;d#q#a&),A$EHHUOLLcllL9: - 	'r<   rX  N)rY  rZ  r[  r\  r?  rF  rI  r\  rf  r]  r^  r_  s   @r9   r:  r:    s$     4""&F<( (r<   r:  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestFeedParsersiW  c                j    \        4       pV F  pVP                  V4       K  	  VP                  4       # rm   )r)   feedclose)r6   chunksr  re  s   &&  r9   parseTestFeedParsers.parseY  s.    \
EOOE" !!r<   c                    V P                  R 4      pV P                  VR,          R4       V P                  VR,          R4       R# )zFirst: val
: bad
Second: valr  valr  N)rn  r2   ro   s   & r9   test_empty_header_name_handled.TestFeedParsers.test_empty_header_name_handled_  s9    jj9:Wu-X.r<   c                   V P                  R .4      pV P                  VP                  4       . RO4       V P                  R.4      pV P                  VP                  4       . RO4       V P                  RR.4      pV P                  VP                  4       RR.4       V P                  RR.4      pV P                  VP                  4       RR.4       V P                  RR	.4      pV P                  VP                  4       RR.4       V P                  R
.4      pV P                  VP                  4       R.4       V P                  . RO4      pV P                  VP                  4       RR.4       R# )za:
b:c:
d:
r  rQ  za:
b:c:
d:za:bc:
bca:zb:
z
b:
u   a:b: c:
N)r  rQ  r   r#  )r  u	   b: c:)rw  u   b:ru  r  r+   )rQ  u   c:)rn  r2   r  r   rL  s   & r9   test_newlinesTestFeedParsers.test_newlinese  s3   JJ,-.#78JJ*+,#78JJ()C;/JJ'(C:.JJ)*C:. JJ,-.%<$=>JJ12Y$@Ar<   c                   R Rr!V P                  R.RV,          .V,          ,           4      pV P                  VP                  4       R
.4       V P                  VP                  4       RV,          V,          4       V P                  R.RV,          .V,          ,           4      pV P                  VP                  4       R
.4       V P                  VP                  4       RV,          V,          4       V P                  R.RV,          R,           .V,          ,           4      pV P                  VP                  4       R
.4       V P                  VP                  4       RV,          R,           V,          4       V P                  RR.RV,          .V,          ,           4      pV P                  VP                  4       RRRV,          V,          3.4       R	# )i  i N  za:b

r  rQ  za:b   rw  zb: N)r  rQ  rx  )rn  r2   r   r^   )r6   MNr   s   &   r9   test_long_linesTestFeedParsers.test_long_linesw  sZ   U1JJ	{c!eWq[01ZL1#a%'2JJ	{c!eWq[01ZL1#a%'2JJ	{c!eFl^a%778ZL13q5<*:;JJ#a%145Yc!eAg$?@r<   rX  N)
rY  rZ  r[  r\  rn  rr  ry  r  r]  r^  r_  s   @r9   ri  ri  W  s!     "/B$A Ar<   ri  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtR tR tR tR tR tR tR tRtV tR# )TestParsersi  c                   V P                   p\        R RR7      ;_uu_ 4       p\        4       P                  V4      pRRR4       V! XR,          R4       V! VR,          R4       V! VP	                  4       R4       V P                  VP                  4       4       V P                  VP                  4       \        4       R#   + '       g   i     L; i)	rm  rZ   r   Nr   ppp-request@zzz.orgr   ppp@zzz.orgrs   )
r2   r'   r   rn  rI   r  r  r  r^   r   r6   r7   r   r8   s   &   r9   test_header_parserTestParsers.test_header_parser  s    lW55.&&r*C 6
3v;-.
3t9m$
3!#45))+,coo/5 65s   C  C	c                   V P                   p\        R R4      ;_uu_ 4       p\        P                  P	                  4       P                  V4      pRRR4       V! XR,          R4       V! VR,          R4       V! VP                  4       R4       V P                  VP                  4       4       V P                  VP                  4       \        4       V P                  VP                  RR	7      \        4       R#   + '       g   i     L; i)
rm  re  Nr   r  r   r  rs   Tr\   )r2   r'   r   r   r   rn  rI   r  r  r  r^   r   r  r  s   &   r9   test_bytes_header_parser$TestParsers.test_bytes_header_parser  s    lD))R,,00288<C *
3v;-.
3t9m$
3!#45))+,coo/5cooTo:EB *)s   .C99D		c                V   \        R RR7      ;_uu_ 4       pVP                  4       pRRR4       \        P                  P	                  \        P
                  P                  R7      pVP                  XRR7      pV P                  VP                  . 4       R#   + '       g   i     Ly; i)z
msg_47.txtrZ   r   Nr   T)headersonly)
r'   r   r   r   r   r   r  r   r2   r  )r6   r   r   r   
parsed_msgs   &    r9   %test_header_parser_multipart_is_valid1TestParsers.test_header_parser_multipart_is_valid  su    lW55ggiG 6 $$ELL,@,@$A__W$_?
++R0 65s   BB(	c                    \        R R4      ;_uu_ 4       p\        P                  P                  4       P	                  V4       V P                  VP                  4       RRR4       R#   + '       g   i     R# ; i)rm  re  N)r'   r   r   BytesParserrn  r  closedr  s   & r9   %test_bytes_parser_does_not_close_file1TestParsers.test_bytes_parser_does_not_close_file  sM    lD))RLL$$&,,R0RYY' *)))s   A	A((A9	c           	     z   \        R R4      ;_uu_ 4       p\        P                  P                  pV P	                  \        P
                  P                  V! \        P                  P                  R7      P                  V4       V P                  VP                  4       RRR4       R#   + '       g   i     R# ; i)rV  re  r   N)r'   r   r   r  r   r    rX  r   r  rn  r  r  )r6   r   bytesParsers   &  r9   2test_bytes_parser_on_exception_does_not_close_file>TestParsers.test_bytes_parser_on_exception_does_not_close_file  sx    lD))R,,22KellFF)1D1DEKK " RYY' *)))s   B
B))B:	c                    \        R RR7      ;_uu_ 4       p\        P                  P                  4       P	                  V4       V P                  VP                  4       RRR4       R#   + '       g   i     R# ; i)rm  rZ   r   N)r'   r   r   r   rn  r  r  r  s   & r9   test_parser_does_not_close_file+TestParsers.test_parser_does_not_close_file  sM    lW55LL!''+RYY' 6555s   A	A))A:	c           	     |   \        R RR7      ;_uu_ 4       p\        P                  P                  pV P	                  \        P
                  P                  V! \        P                  P                  R7      P                  V4       V P                  VP                  4       RRR4       R#   + '       g   i     R# ; i)rV  rZ   r   r   N)r'   r   r   r   r   r    rX  r   r  rn  r  r  )r6   r   r   s   &  r9   ,test_parser_on_exception_does_not_close_file8TestParsers.test_parser_on_exception_does_not_close_file  sv    lW55\\((FellFF$ELL,?,?@FFLRYY'	 6555s   B
B**B;	c                    V P                   p\        P                  ! R 4      pV! VR,          R4       V! VR,          R4       V! VP                  4       R4       R# )zFrom: aperson@dom.ain
To: bperson@dom.ain
Subject: the next line has a space on it
 
Date: Mon, 8 Apr 2002 15:09:19 -0400
Message-ID: spam

Here's the message body
r  !the next line has a space on it
 r  spamHere's the message body
Nr2   r   r  r^   r5   s   &  r9   test_whitespace_continuation(TestParsers.test_whitespace_continuation  V     '' 	) 	 	3y>?@
3|f%
3??9:r<   c                    V P                   p\        P                  ! R 4      pV! VR,          R4       V! VR,          R4       V! VP                  4       R4       R# )zFrom: aperson@dom.ain
To: bperson@dom.ain
Date: Mon, 8 Apr 2002 15:09:19 -0400
Message-ID: spam
Subject: the next line has a space on it
 

Here's the message body
r  r  r  r  r  Nr  r5   s   &  r9   (test_whitespace_continuation_last_header4TestParsers.test_whitespace_continuation_last_header  r  r<   c                   V P                   p\        R RRR7      ;_uu_ 4       p\        4       P                  V4      pRRR4       V! \	        XP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       R4       V! VP                  4       R4       VP                  ^4      pV! VP                  4       R4       R#   + '       g   i     L; i)r  rZ   r*   r  Nr@   z!Simple email with attachment.

zapplication/riscos)r2   r'   r   rn  rj  r^   rI   )r6   r7   r   r8   part1part2s   &     r9   test_crlf_separation TestParsers.test_crlf_separation  s    lWdCCr(..$C D
3s !1%"
5!!#\2
5 GH"
5!!#%9: DCs   CC	c                F   \        R RRR7      ;_uu_ 4       pVP                  4       pRRR4       \        P                  ! X4      p\	        4       p\        V4      pVP                  VRR7       V P                  VP                  4       V4       R#   + '       g   i     Lp; i)r  rZ   r*   r  Nr   r   r  r  s   &     r9   test_crlf_flattenTestParsers.test_crlf_flatten  st    lWdCCr779D D''-JaL			#v	&t, DCs   BB 	Nc                   V P                   pV P                  p\        R RR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       V! XP                  4       ^4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       R4       V! VP                  4       ^4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       ^ 4       V! VP                  4       R4       V! VP                  4       R4       VP                  ^4      pV! VP                  4       R4       V! VP                  4       ^4       V! \        VP                  4       4      ^4       VP                  ^ 4      pV! VP                  4       ^ 4       V! VP                  4       R4       V! VP                  4       R4       R#   + '       g   i     EL; i)r  rZ   r   Nr  r@   r4  r5  )	r2   r  r'   r   r$  r  rj  r^   rI   )	r6   r7   rr  r   r8   r  part1ar  part2as	   &        r9   -test_multipart_digest_with_extra_mime_headers9TestParsers.test_multipart_digest_with_extra_mime_headers  s   ##lW55))"-C 6 	3q!
3s !1%"
5!!#%56
5#
3u  "#Q'""1%
6 !$
6""$l3F -0"
5!!#%56
5#
3u  "#Q'""1%
6 !$
6""$l3F -05 655s   G00H	c                    . ROp\         P                  ! \        P                  V4      4      pV P	                  VR,          R4       R# )$From: Andrew Person <aperson@dom.aindatezTue, 20 Aug 2002 16:43:45 +1000N)r  zSubject: Testz%Date: Tue, 20 Aug 2002 16:43:45 +1000)r   r  r   r   r2   )r6   r   r8   s   &  r9   test_three_linesTestParsers.test_three_lines  s8    : ''7V&GHr<   c                    V P                   pR pRpRV: RV: R2p\        P                  ! V4      pV! VP                  R4      V4       V! VP                  R4      V4       R# )r   z	more textzHeader: z
Next-Header: z

Body

r   zNext-HeaderN)r2   r   r  get)r6   r7   value1value2r   r8   s   &     r9   3test_strip_line_feed_and_carriage_return_in_headers?TestParsers.test_strip_line_feed_and_carriage_return_in_headers%  sY    F''*
3778f%
377=!6*r<   c                    V P                   pR p\        P                  ! V4      pV! \        V4      ^4       V! \	        R V 4       4      . RO4       V! VP                  4       R4       R# )z(>From: foo
From: bar
!"#QUX;~: zoo

bodyc              3   $   "   T F  qx  K  	  R # 5irm   rX  )r  fields   & r9   r  9TestParsers.test_rfc2822_header_syntax.<locals>.<genexpr>5  s     )SE%S   r  N)z!"#QUX;~z>Fromr   )r2   r   r  rj  r  r^   r1  s   &   r9   test_rfc2822_header_syntax&TestParsers.test_rfc2822_header_syntax0  sV    :''*
3s8Q
6)S))+HI
3??f%r<   c                    V P                   pR p\        P                  ! V4      pV! \        VP	                  4       4      ^ 4       R# )z<>From foo@example.com 11:25:53
From: bar
!"#QUX;~: zoo

bodyN)r2   r   r  rj  r  r1  s   &   r9   (test_rfc2822_space_not_allowed_in_header4TestParsers.test_rfc2822_space_not_allowed_in_header8  s6    N''*
3sxxz?Ar<   c                    V P                   pR p\        P                  ! V4      pVP                  4       pVP	                  4        V! V. RO4       V! VP                  4       R4       R# )z7A: first header
B: second header
CC: third header

bodyr  N)ABCC)r2   r   r  r  sortr^   )r6   r7   r   r8   headerss   &    r9   !test_rfc2822_one_character_header-TestParsers.test_rfc2822_one_character_header>  sR    I''*((*
7$%
3??f%r<   c                    R p\         P                  ! V4      pV P                  VP                  ^ 4      P                  4       R4       R# )zFrom: foo@bar.com
To: baz
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=BOUNDARY

--BOUNDARY
Content-Type: text/plain

body ending with CRLF newline

--BOUNDARY--
r   N)r   r  r  r^   r6   r   r8   s   &  r9   test_CRLFLF_at_end_of_part&TestParsers.test_CRLFLF_at_end_of_partG  s@    
 	
 ''*COOA.::<fEr<   rX  )rY  rZ  r[  r\  r  r  r  r  r  r  r  r  r  r  r  r;  r  r  r  r  r  r  r  r]  r^  r_  s   @r9   r  r    so     	6
C1(
((
(;$;$	;- G1>I	+&&F Fr<   r  c                     a ] tR tRt o]P
                  ! R4      tR tR tR t	R t
R tR tR	 tR.tR
P                  ] U Uu. uF  w  rV NK	  	  upp 4      R,           P!                  R4      tR tR tR tR tR tR tR tR tR tR tR t]P
                  ! R4      P!                  R4      tR tR t]P
                  ! R4      t R t!R t"R t#] PI                  R
4      t%R.]%R &   R
P                  ]%4      t%R! t&]P
                  ! R"4      P!                  R#4      t']P
                  ! R$4      t(R% t)R& t*R' t+R( t,R) t-R* t.R+ t/R,t0R-t1Vt2R,# u upp i )/Test8BitBytesHandlingi[  z        From: foo@bar.com
        To: baz
        Mime-Version: 1.0
        Content-Type: text/plain; charset={charset}
        Content-Transfer-Encoding: {cte}

        {bodyline}
        c                .   V P                   P                  R RRR7      P                  R 4      p\        P                  ! V4      pV P                  VP                  4       R4       V P                  VP                  RR7      RP                  R 4      4       R# )rZ   re      pöstalrB   r   bodyline   pöstal
Tr\   Nbodytest_msgr7  r   r   r   r2   r^   r  s   &  r9   test_known_8bit_CTE)Test8BitBytesHandling.test_known_8bit_CTEn  s    $$W)/.7 % 99? 	
 &&q)*K85$++G4	6r<   c                .   V P                   P                  R RRR7      P                  R4      p\        P                  ! V4      pV P                  VP                  4       R4       V P                  VP                  RR7      RP                  R4      4       R	# )
notavalidcharsetre   r  r  rZ   u   p��stal
Tr\   r  Nr  r  s   &  r9   test_unknown_8bit_CTE+Test8BitBytesHandling.test_unknown_8bit_CTEw  s    $$-?)/.7 % 99? 	
 &&q)*,AB5$++G4	6r<   c                .   V P                   P                  R RRR7      P                  R 4      p\        P                  ! V4      pV P                  VP                  4       R4       V P                  VP                  RR7      RP                  R 4      4       R# )	rZ   rD      p=C3=B6stálr  u   p=C3=B6stál
Tr\   	   pöstál
Nr  r  s   &  r9   test_8bit_in_quopri_body.Test8BitBytesHandling.test_8bit_in_quopri_body  s     $$W);.< % >>DfWo 	
 &&q)*,<=5%,,W5	7r<   c                .   V P                   P                  R RRR7      P                  R4      p\        P                  ! V4      pV P                  VP                  4       R4       V P                  VP                  RR7      RP                  R4      4       R	# )
r   rD   r  r  rZ   u   p=C3=B6st��l
Tr\   r  Nr  r  s   &  r9   .test_invalid_8bit_in_non_8bit_cte_uses_replaceDTest8BitBytesHandling.test_invalid_8bit_in_non_8bit_cte_uses_replace  s     $$W);.< % >>DfWo 	
 &&q)*,FG5$++G4	6r<   c                P   V P                   P                  R RRR7      P                  R 4      p\        P                  ! V4      pV P                  VP                  RR7      RP                  R 4      4       V P                  VP                  ^ ,          \        P                  4       R# )rZ   r[   u   cMO2c3RhbAá=r  Tr\   r  N)r  r7  r   r   r   r2   r^   r  r  r    r  r  s   &  r9   test_8bit_in_base64_body.Test8BitBytesHandling.test_8bit_in_base64_body  s     $$W)1.= % ??Evg 	
 &&q)5"))'2	4ckk!n$BB	Dr<   c                    V P                   P                  R RRR7      P                  R 4      p\        P                  ! V4      pV P                  VP                  RR7      RP                  R 4      4       R# )rZ   r   u   <,.V<W1A; á r  Tr\   u   <,.V<W1A; á 
Nr  r  s   &  r9   test_8bit_in_uuencode_body0Test8BitBytesHandling.test_8bit_in_uuencode_body  sn     $$W)3.= % ??Evg 	
 &&q)5*11':	<r<   c                   \         P                  ! R 4      P                  R4      p\        P                  ! V4      pV P                  VP                  4       R4       V P                  VP                  RR7      RP                  R4      4       R# )u           From: foo@bar.com
        To: baz
        Mime-Version: 1.0
        Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8
        Content-Transfer-Encoding: 8bit

        pöstal
        rZ   r  Tr\   N)r   r   r   r   r   r2   r^   r  s   &  r9   test_rfc2231_charset_8bit_CTE3Test8BitBytesHandling.test_rfc2231_charset_8bit_CTE  su    OO   VG_ 	
 &&q)*K85$++G4	6r<   r*   z
Yes, they are flying.
rZ   c                    \         P                  ! V P                  4      pV P                  \	        VP                  R 4      4      R4       V P                  \	        VR ,          4      R4       R# )r      b��zN)r   r   headertest_msgr2   r   r  ro   s   & r9   test_get_8bit_header*Test8BitBytesHandling.test_get_8bit_header  sO    &&t':':;SWWT]+-=>SY)9:r<   c                   \         P                  ! V P                  4      pT P                  \	        V4      \
        P                  ! R 4      P                  ! V P                   UUu. uF  w  r#V^,          NK  	  upp!  4       R# u uppi )z                            From: {}
                            To: {}
                            Subject: {}
                            From: {}

                            Yes, they are flying.
                            N)	r   r   r  r2   r   r   r   r7  headertest_headers)r6   r8   _r  s   &   r9   test_print_8bit_headers-Test8BitBytesHandling.test_print_8bit_headers  s    &&t':':;S! *  ! "(( )-(?(?*A(? ;H1(1++(?*AB		C*As   %Bc                    \         P                  ! V P                  4      pT P                  VP	                  4        Uu. uF  p\        V4      NK  	  up. RO4       R# u upi )r  N)r  r  ]   Maintenant je vous pr��sente mon coll��gue, le pouf c��l��bre
	Jean de Baddie	   g��st)r   r   r  assertListEqualr  r   r6   r8   r  s   &  r9   test_values_with_8bit_headers3Test8BitBytesHandling.test_values_with_8bit_headers  sI    &&t':':;cjjl;lc!fl;2	3;s   Ac           
         \         P                  ! V P                  4      pT P                  VP	                  4        UUu. uF  w  r#\        V4      \        V4      3NK  	  upp. RO4       R# u uppi )r   N)r   r  )r   r  )rJ  r  )r   r  )r   r   r  r  r   r   )r6   r8   r  rp  s   &   r9   test_items_with_8bit_headers2Test8BitBytesHandling.test_items_with_8bit_headers  sT    &&t':':;SYY[I[6As1vs1v.[I<	=Is   !A-
c                    \         P                  ! V P                  4      pT P                  VP	                  R 4       Uu. uF  p\        V4      NK  	  upRR.4       R# u upi )r   r  r  N)r   r   r  r  r4   r   r  s   &  r9   test_get_all_with_8bit_headers4Test8BitBytesHandling.test_get_all_with_8bit_headers  sT    &&t':':;ckk&.AB.Ac!f.AB,02	3Bs   Ac                8   \         P                  ! \        P                  ! R 4      P	                  R4      4      pV P                  VP                  4       R4       V P                  VP                  4       R4       V P                  VP                  4       R4       R# )uA               Content-Type: text/pl§in; charset=utf-8
            r+  u   text/pl�inr   u   pl�inN)	r   r   r   r   r   r2   rI   r  r  ro   s   & r9   test_get_content_type_with_8bit5Test8BitBytesHandling.test_get_content_type_with_8bit  sz    &&x 8 (	"$ 	--/1BC113V<002LAr<   c                $   \         P                  ! R P                  R4      4      pV P                  VP	                  RR7      . RO4       V P                  VP                  RRR7      R4       V P                  VP                  RRR7      R4       R# )	u(   X-Header: foo=§ne; b§r=two; baz=three
r+  r4  r5     �neFoou   b§rN))r   r  )u   b�rr9  r:  )r   r   r   r2   r<  rJ   ro   s   & r9   test_get_params_with_8bit/Test8BitBytesHandling.test_get_params_with_8bit  sz    &&;BB9MOz:G	IuZ@*Mx
CTJr<   c                    \         P                  ! \        P                  ! R 4      P	                  R4      4      pV P                  VP                  R4      R4       R# )n               Content-Type: text/plain; charset=us-ascii;
             title*=us-ascii'en'This%20is%20not%20f§nr+  titleN)rP   enu   This is not f�n)r   r   r   r   r   r2   rJ   ro   s   & r9   !test_get_rfc2231_params_with_8bit7Test8BitBytesHandling.test_get_rfc2231_params_with_8bit  sL    &&x 8< ( vi " 	w/6	8r<   c                    \         P                  ! \        P                  ! R 4      P	                  R4      4      pVP                  RR4       V P                  VP                  R4      R4       R# )r  r+  r  testN)r   r   r   r   r   ra  r2   rJ   ro   s   & r9   !test_set_rfc2231_params_with_8bit7Test8BitBytesHandling.test_set_rfc2231_params_with_8bit   sW    &&x 8< ( vi " 	gv&w/8r<   c                   \         P                  ! \        P                  ! R 4      P	                  R4      4      pVP                  R4       V P                  VP                  R4      R4       V P                  VP                  4       R4       R# )r  r+  r  Nr   )	r   r   r   r   r   rl  r2   rJ   r  ro   s   & r9   !test_del_rfc2231_params_with_8bit7Test8BitBytesHandling.test_del_rfc2231_params_with_8bit(  sn    &&x 8< ( vi " 	gw/6113V<r<   c                    \         P                  ! \        P                  ! R 4      P	                  R4      4      pV P                  VP                  4       R4       V P                  VP                  RR7      R4       R# )u               Content-Transfer-Encoding: b§se64
            Content-Type: text/plain; charset=latin-1

            payload
            r+  zpayload
Tr\   s   payload
N)r   r   r   r   r   r2   r^   ro   s   & r9   %test_get_payload_with_8bit_cte_header;Test8BitBytesHandling.test_get_payload_with_8bit_cte_header1  sb    &&x 8 (
 	"$ 	*K85|Dr<   u0          From: foo@bar.com
        To: báz
        Subject: Maintenant je vous présente mon collègue, le pouf célèbre
        	Jean de Baddie
        Mime-Version: 1.0
        Content-Type: text/plain; charset="utf-8"
        Content-Transfer-Encoding: 8bit

        Да, они летят.
        c                
   \         P                  ! V P                  4      p\        4       p\         P                  P                  V4      P                  V4       V P                  VP                  4       V P                  4       R # rm   )	r   r   non_latin_bin_msgr   r   r   r   r2   r   r6   r8   r   s   &  r9   test_bytes_generator*Test8BitBytesHandling.test_bytes_generatorG  sX    &&t'='=>i&&s+33C8)?)?@r<   c                    \         P                  P                  4       p\        4       p\         P                  P                  V4      P                  V4       V P                  VP                  4       R 4       R# )r  N)	r   r  r   r   r   r   r   r2   r   r+  s   &  r9   &test_bytes_generator_handles_None_body<Test8BitBytesHandling.test_bytes_generator_handles_None_bodyM  sN    mm##%i&&s+33C8/r<   a          From: foo@bar.com
        To: =?unknown-8bit?q?b=C3=A1z?=
        Subject: =?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue?=
         =?unknown-8bit?q?=2C_le_pouf_c=C3=A9l=C3=A8bre?=
         =?unknown-8bit?q?_Jean_de_Baddie?=
        Mime-Version: 1.0
        Content-Type: text/plain; charset="utf-8"
        Content-Transfer-Encoding: base64

        0JTQsCwg0L7QvdC4INC70LXRgtGP0YIuCg==
        c                
   \         P                  ! V P                  4      p\        4       p\         P                  P                  V4      P                  V4       V P                  VP                  4       V P                  4       R # rm   )
r   r   r*  r   r   r   r   r2   r    non_latin_bin_msg_as7bit_wrappedr+  s   &  r9   test_generator_handles_8bit1Test8BitBytesHandling.test_generator_handles_8bita  sX    &&t'='=>j!!#&..s3)N)NOr<   c                z   \         P                  ! V P                  4      p\        4       p\	        V4      P                  V4       VP                  4       p\        \        4       4      P                  V4       \        4       p\	        V4      P                  V4       V P                  VP                  4       V4       R # rm   )
r   r   r*  r   r   r   r   r   r   r2   )r6   r8   r   
orig_values   &   r9   ;test_str_generator_should_not_mutate_msg_when_handling_8bitQTest8BitBytesHandling.test_str_generator_should_not_mutate_msg_when_handling_8bitg  s    &&t'='=>is##C(\\^
(*%%c*is##C(4r<   c                   \         P                  ! V P                  4      p\        4       p\         P                  P                  V4      P                  VR R7       VP                  4       P                  R4      pV P                  V^ ,          P                  4       ^ ,          R4       V P                  RP                  VR,          4      V P                  4       R# )Tr   r  s   Fromr   N)r   r   r*  r   r   r   r   r   r   r2   r   )r6   r8   r   r   s   &   r9   #test_bytes_generator_with_unix_from9Test8BitBytesHandling.test_bytes_generator_with_unix_fromq  s     &&t'='=>i&&s+33C$3G$$U+q)!,g6E"I.0F0FGr<   zkSubject: =?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue=2C_le_pouf_c=C3=A9l=C3=A8bre?=:r  r  Nc                   R pV P                  \        V4       \        VR4      ;_uu_ 4       pVP                  V P                  4       RRR4       \        VR4      ;_uu_ 4       p\
        P                  P                  4       P                  V4      pRRR4       V P                  \        X4      V P                  4       R#   + '       g   i     L; i  + '       g   i     LJ; i)ztest.msgwbNre  )
addCleanupr&   openwriter*  r   r   r  rn  r2   r   non_latin_bin_msg_as7bit)r6   r  testfiler   s   &   r9   test_message_from_binary_file3Test8BitBytesHandling.test_message_from_binary_file  s    #"d^^xNN4112 "d^^x((*00:A Q!>!>?	 ^^s   C%.CC	C%	u          From: foo@bar.com
        To: Dinsdale
        Subject: Nudge nudge, wink, wink
        Mime-Version: 1.0
        Content-Type: text/plain; charset="latin-1"
        Content-Transfer-Encoding: 8bit

        oh là là, know what I mean, know what I mean?
        r+  a           From: foo@bar.com
        To: Dinsdale
        Subject: Nudge nudge, wink, wink
        Mime-Version: 1.0
        Content-Type: text/plain; charset="iso-8859-1"
        Content-Transfer-Encoding: quoted-printable

        oh l=E0 l=E0, know what I mean, know what I mean?
        c                    \         P                  ! V P                  4      pV P                  \	        V4      V P
                  4       R # rm   )r   r   latin_bin_msgr2   r   latin_bin_msg_as7bitrL  s   & r9   :test_string_generator_reencodes_to_quopri_when_appropriatePTest8BitBytesHandling.test_string_generator_reencodes_to_quopri_when_appropriate  s2    $$T%7%78Q!:!:;r<   c                6   \         P                  ! V P                  4      p\        4       p\         P                  P                  V4      P                  V4       V P                  VP                  4       V P                  P                  R 4      R,           4       R# )r+  r*   N)
r   r   rF  r   r   r   r   r2   r   r]   )r6   r   r   s   &  r9   )test_decoded_generator_emits_unicode_body?Test8BitBytesHandling.test_decoded_generator_emits_unicode_body  sm    $$T%7%78j((-55a8 	%%i05	7r<   c                B   \         P                  P                  4       p\        ^ \	        V P
                  4      ^
4       F'  pVP                  V P
                  W"^
,            4       K)  	  VP                  4       pV P                  \        V4      V P                  4       R# )r   N)r   r  BytesFeedParserr  rj  rF  rk  rl  r2   r   rG  )r6   bfpr  r   s   &   r9   test_bytes_feedparser+Test8BitBytesHandling.test_bytes_feedparser  st    ..0q#d00126AHHT''B$/0 7IIKQ!:!:;r<   c                j   \        R R4      ;_uu_ 4       pVP                  4       pRRR4       \        P                  ! X4      p\	        4       p\        P
                  P                  V4      pVP                  VRR7       V P                  VP                  4       V4       R#   + '       g   i     L; i)r  re  Nr   r   )
r'   r   r   r   r   r   r   r   r2   r   r  s   &     r9   r  'Test8BitBytesHandling.test_crlf_flatten  s{    lD))R779D *&&t,IOO**1-			#v	&t, *)s   B""B2	c                0   \         P                  ! R 4      P                  R4      p\        P                  ! V4      p\        4       p\        P                  P                  V4      pVP                  V4       V P                  VP                  4       V4       R# )uo              Date: Fri, 18 Mar 2011 17:15:43 +0100
            To: foo@example.com
            From: foodwatch-Newsletter <bar@example.com>
            Subject: Aktuelles zu Japan, Klonfleisch und Smiley-System
            Message-ID: <76a486bee62b0d200f33dc2ca08220ad@localhost.localdomain>
            MIME-Version: 1.0
            Content-Type: multipart/alternative;
                    boundary="b1_76a486bee62b0d200f33dc2ca08220ad"

            --b1_76a486bee62b0d200f33dc2ca08220ad
            Content-Type: text/plain; charset="utf-8"
            Content-Transfer-Encoding: 8bit

            Guten Tag, ,

            mit großer Betroffenheit verfolgen auch wir im foodwatch-Team die
            Nachrichten aus Japan.


            --b1_76a486bee62b0d200f33dc2ca08220ad
            Content-Type: text/html; charset="utf-8"
            Content-Transfer-Encoding: 8bit

            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/html4/loose.dtd">
            <html lang="de">
            <head>
                    <title>foodwatch - Newsletter</title>
            </head>
            <body>
              <p>mit gro&szlig;er Betroffenheit verfolgen auch wir im foodwatch-Team
                 die Nachrichten aus Japan.</p>
            </body>
            </html>
            --b1_76a486bee62b0d200f33dc2ca08220ad--

            rZ   N)r   r   r   r   r   r   r   r   r   r2   r   )r6   r  r8   r   r   s   &    r9   test_8bit_multipart)Test8BitBytesHandling.test_8bit_multipart  st     %" %J K 	L &&v.IOO**1-			#v.r<   c                    \        4       p\        R 4      VR&   \        4       p\        P                  P                  V4      pVP                  VRR7       V P                  VP                  4       R4       R# )   žluťoučký kůňrJ  r   r   s5   Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?=

N)	r   r   r   r   r   r   r   r2   r   r6   r   r   r   s   &   r9   'test_bytes_generator_b_encoding_linesep=Test8BitBytesHandling.test_bytes_generator_b_encoding_linesep  s^    I34)IOO**1-			!V	$JJLH	Jr<   c                    \        4       p\        R 4      VR&   \        4       p\        P                  P                  V4      pVP                  VRR7       V P                  VP                  4       R4       R# )rX  rJ  r   r   z5Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?=

N)	r   r   r   r   r   r   r   r2   r   rY  s   &   r9   !test_generator_b_encoding_linesep7Test8BitBytesHandling.test_generator_b_encoding_linesep  s^    I34)JOO%%a(			!V	$JJLG	Ir<   NrX  ))zFrom: foo@bar.comr  )u   To: báz)r   z=?unknown-8bit?q?b=C3=A1z?=)uV   Subject: Maintenant je vous présente mon collègue, le pouf célèbre
	Jean de Baddie)rJ  z=?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue=2C_le_pouf_c=C3=A9l=C3=A8bre?=
 =?unknown-8bit?q?_Jean_de_Baddie?=)u   From: göst)r   z=?unknown-8bit?b?Z8O2c3Q=?=)3rY  rZ  r[  r\  r   r   r  r  r  r  r  r  r  r  r  r   r   r  r  r  r  r  r  r  r  r  r!  r$  r'  r*  r,  r/  r2  r3  r7  r:  r   rA  rC  rF  rG  rH  rK  rP  r  rU  rZ  r]  r;  r]  r^  )srcr   r`  s   00@r9   r  r  [  s     ?? $ L667$6 D<6 	
 ii5G H5G#5G HI#$%+VG_ ;
C	3
=3BK89=E ! 
) 
 VG_ A0 (0 8 ($P5	H  @EEdK	8%9S!  $yy)AB@ OO 	% 	 VI  $?? 	, 	<7<-,/\
J
I Ge	 !Is   E
r  c                   4   a  ] tR tRt o RtR tRR ltRtV tR# ) BaseTestBytesGeneratorIdempotenti  Nc                    \        VR 4      ;_uu_ 4       pVP                  4       pRRR4       V P                  P                  V P                  X4      p\
        P                  ! V4      pWC3#   + '       g   i     LO; i)re  N)r'   r   normalize_linesep_regexsubblinesepr   r   rZ  s   &&   r9   r3   (BaseTestBytesGeneratorIdempotent._msgobj  s^    h%%779D &++//tD&&t,y	 &%s   A--A=	c                    \        4       p\        P                  P                  V^ R7      pVP	                  WV P
                  R7       V P                  W$P                  4       4       R# )r   r	  )r   r   N)r   r   r   r   r   r   r2   r   )r6   r8   r`   r   rQ  r   s   &&&&  r9   r]  ,BaseTestBytesGeneratorIdempotent._idempotent  sJ    IOO**11*=			#$,,	?zz|,r<   rX  r  )	rY  rZ  r[  r\  r;  r3   r]  r]  r^  r_  s   @r9   ra  ra    s     G- -r<   ra  c                   B    ] tR tRtRtRt]P                  ! R4      tRt	R# )TestBytesGeneratorIdempotentNLi  r*   r  s   \r\nrX  N
rY  rZ  r[  r\  r   re  recompilerc  r]  rX  r<   r9   rj  rj    s    GH jj2r<   rj  c                   B    ] tR tRtRtRt]P                  ! R4      tRt	R# ) TestBytesGeneratorIdempotentCRLFi!  r   r  s	   (?<!\r)\nrX  Nrk  rX  r<   r9   ro  ro  !  s    GH jj7r<   ro  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )
TestBase64i(  c           
     j   V P                   pV! \        P                  ! R 4      \        \        P                  ! RRR7      4      4       \        ^4       F[  pV^ 8X  d   ^ pM*V^8:  d   ^pM V^8:  d   ^pMV^	8:  d   ^pMV^8:  d   ^pM^pV! \        P                  ! RV,          4      V4       K]  	  R# )hello   hellor+   eolr  N)r2   r   header_lengthrj  body_encoder  )r6   r7   sizebsizes   &   r9   test_lenTestBase64.test_len)  s    
:##G,z%%hB78	:"IDQUQUQURURU%'Uz''d
3U; r<   c                    V P                   pV! \        P                  ! R 4      R4       V! \        P                  ! R4      R4       R# )r+   r<   zaGVsbG8=rt  N)r2   r   r]   r	  s   & r9   test_decodeTestBase64.test_decode6  s7    
:R #&
:Z((3r<   c                J   V P                   pV! \        P                  ! R 4      R4       V! \        P                  ! R4      R4       V! \        P                  ! R4      R4       V! \        P                  ! R^(R7      R4       V! \        P                  ! R^(RR	7      R
4       R# )r<   r+   rt  z	aGVsbG8=
s   hello
z	aGVsbG8K
r  zeHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
r   r  rv  zeHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
Nsd   xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx )r2   r   rx  r	  s   & r9   test_encodeTestBase64.test_encode;  s    
:!!#&+
:!!(+\:
:!!*-|<
:!!-B? B 	 	:!!-BFK	r<   c                    V P                   p\        P                  pV! V! R 4      R4       V! V! R4      R4       V! V! R4      R4       V! V! R RR7      R4       V! V! R4      R4       R	# )
rs  z=?iso-8859-1?b?aGVsbG8=?=hello
worldz!=?iso-8859-1?b?aGVsbG8NCndvcmxk?=hello
worldz!=?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=r|   r~  z=?iso-8859-2?b?aGVsbG8=?=N)r2   r   r[  )r6   r7   hes   &  r9   test_header_encodeTestBase64.test_header_encodeQ  sj    %%
2g;34
2!DE
2nBC
2g|,.IJ
2nBCr<   rX  N)
rY  rZ  r[  r\  r{  r~  r  r  r]  r^  r_  s   @r9   rq  rq  (  s      <4
,D Dr<   rq  c                     a  ] tR tRt o R tR tR tR tR tR t	RGR	 lt
R
 tR tR tR tR tR tR tR tR tR tR tRGR ltR tR tR tR tR tR tR tR tR tR t R  t!R! t"R" t#R# t$R$ t%R% t&R& t'R' t(R( t)R) t*R* t+R+ t,R, t-RHR- lt.R. t/R/ t0R0 t1R1 t2R2 t3R3 t4R4 t5R5 t6R6 t7R7 t8R8 t9R9 t:R: t;R; t<R< t=R= t>R> t?R? t@R@ tARA tBRB tCRC tDRD tERE tFRFtGV tHR# )I
TestQuoprii\  c                   \        \        \        \        R 4      \        R4      ^,           4      \        \        R4      \        R4      ^,           4      \        \        R4      \        R4      ^,           4      R R 4       4      4      V n        \        R4       Uu. uF  qV P                  9  g   K  VNK  	  upV n        \        \        \        R	4      \        R
4      ^,           4      4      V n        V P                  P                  \        R4      4       V P                  P                  \        R4      4       \        R4       Uu. uF  qV P                  9  g   K  VNK  	  upV n	        R# u upi u upi )r  zr  Zr  9c              3   $   "   T F  qx  K  	  R # 5irm   rX  )r  r   s   & r9   r  #TestQuopri.setUp.<locals>.<genexpr>d  s     !1Qr  s   !*+-/   r,   ~r  =N)
r  r   r  ordhlithnonblitr  removebnonr6   r   s   & r9   r@  TestQuopri.setUp]  s    #c(CHqL)#c(CHqL)#c(CHqL)!!	# $	 !&c
A
1tyy.@QQ
A	 s3xSA67			T#		S" !&c
A
1tyy.@QQ
A	 B Bs   E.1E.E3E3c                *   V P                    F9  pV P                  \        P                  ! V4      R \	        V4      ,          4       K;  	  V P
                   F9  pV P                  \        P                  ! V4      R\	        V4      ,          4       K;  	  R# )z'Should not be header quopri encoded: %sz#Should be header quopri encoded: %sN)r  r  r"   header_checkchrr  r   r  s   & r9   test_quopri_header_check#TestQuopri.test_quopri_header_checks  sn    AZ44Q7ACFJL  AOOJ33A6ACFJL r<   c                *   V P                    F9  pV P                  \        P                  ! V4      R \	        V4      ,          4       K;  	  V P
                   F9  pV P                  \        P                  ! V4      R\	        V4      ,          4       K;  	  R# )z%Should not be body quopri encoded: %sz!Should be body quopri encoded: %sN)r  r  r"   
body_checkr  r  r   r  s   & r9   test_quopri_body_check!TestQuopri.test_quopri_body_check{  sn    AZ2215?#a&HJ  AOOJ11!4?#a&HJ r<   c           	     (   V P                   pV! \        P                  ! R 4      ^4       V! \        \        P                  ! R RR7      4      \        P                  ! R 4      ^
,           4       V! \        P                  ! R4      ^4       V! \        \        P                  ! RRR7      4      \        P                  ! R4      ^
,           4       V P
                   F;  pV! \        P                  ! \        V.4      4      ^R\        V4      ,          4       K=  	  V P                   FM  pV\        R4      8X  d   K  V! \        P                  ! \        V.4      4      ^R\        V4      ,          4       KO  	  V! \        P                  ! R4      ^4       R# )	rt  xxxr~  s
   h@e@l@l@o@zexpected length 1 for %rr,   zexpected length 3 for %r    N)
r2   r"   rw  rj  r[  r  r  r  r  r  r6   r7   r   s   &  r9   test_header_quopri_len!TestQuopri.test_header_quopri_len  s4   
:##H-q1
3z''%@A##H-	 	:##M2B7
3z''uEF##M2	 Az''qc
3Q)CF24  ACH}z''qc
3Q)CF24	  	:##D)1-r<   c                   V P                   pV P                   F*  pV! \        P                  ! \	        V.4      4      ^4       K,  	  V P
                   F*  pV! \        P                  ! \	        V.4      4      ^4       K,  	  R# r   )r2   r  r"   body_lengthr  r  r  s   &  r9   test_body_quopri_lenTestQuopri.test_body_quopri_len  s_    Az%%eQCj115 Az%%eQCj115 r<   c                    \        R 4       FH  p\        V4      pV P                  \        P                  ! \        P
                  ! V4      4      V4       KJ  	  R# )r  N)r  r  r2   r"   rO  quote)r6   r  r   s   &  r9   test_quote_unquote_idempotent(TestQuopri.test_quote_unquote_idempotent  s?    sAAAZ//
0@0@0CDaH r<   Nc                    Vf   \         P                  ! V4      pM\         P                  ! W4      pV P                  WB4       R # rm   )r"   r[  r2   )r6   r   expected_encoded_headerrB   encoded_headers   &&&& r9   _test_header_encodeTestQuopri._test_header_encode  s5    ?'55f=N'55fFNAr<   c                *    V P                  R R4       R# )r<   r+   Nr  r?  s   &r9   test_header_encode_null"TestQuopri.test_header_encode_null  s      b)r<   c                *    V P                  R R4       R# )rt  z=?iso-8859-1?q?hello?=Nr  r?  s   &r9   test_header_encode_one_word&TestQuopri.test_header_encode_one_word  s      +CDr<   c                *    V P                  R R4       R# )s   hello
worldz=?iso-8859-1?q?hello=0Aworld?=Nr  r?  s   &r9   test_header_encode_two_lines'TestQuopri.test_header_encode_two_lines  s       @	Br<   c                *    V P                  R R4       R# )s   hellotherez=?iso-8859-1?q?hello=C7there?=Nr  r?  s   &r9   test_header_encode_non_ascii'TestQuopri.test_header_encode_non_ascii  s      !2 @	Br<   c                .    V P                  R RRR7       R# )rt  z=?iso-8859-2?q?hello?=r|   r~  Nr  r?  s   &r9   test_header_encode_alt_charset)TestQuopri.test_header_encode_alt_charset  s      +C$ 	! 	&r<   c                T    \         P                  ! V4      pV P                  W24       R # rm   )r"   header_decoder2   )r6   r  expected_decoded_headerdecoded_headers   &&& r9   _test_header_decodeTestQuopri._test_header_decode  s     #11.AAr<   c                *    V P                  R R 4       R# rh  r  r?  s   &r9   test_header_decode_null"TestQuopri.test_header_decode_null  s      R(r<   c                *    V P                  R R 4       R# rs  Nr  r?  s   &r9   test_header_decode_one_word&TestQuopri.test_header_decode_one_word  s      '2r<   c                *    V P                  R R4       R# )zhello=0Aworldr  Nr  r?  s   &r9   test_header_decode_two_lines'TestQuopri.test_header_decode_two_lines  s      .Ar<   c                *    V P                  R R4       R# )zhello=C7thereu   helloÇthereNr  r?  s   &r9   test_header_decode_non_ascii'TestQuopri.test_header_decode_non_ascii  s      2BCr<   c                R    V P                  \        P                  ! R4      R4       R# )z=30Na  =30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30  00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)r2   r"   r  r?  s   &r9   test_header_decode_re_bug_18380*TestQuopri.test_header_decode_re_bug_18380  s    11+>	Jr<   c                    Vf   \         P                  ! V4      pM\         P                  ! WR7      pV P                  WB4       R # )Nru  )r"   r]   r2   )r6   encodedexpected_decodedrv  decodeds   &&&& r9   _test_decodeTestQuopri._test_decode  s5    ; ''0G ''9G3r<   c                *    V P                  R R 4       R# rh  r  r?  s   &r9   test_decode_null_word TestQuopri.test_decode_null_word      "b!r<   c                *    V P                  R R4       R# )r   r*   Nr  r?  s   &r9   test_decode_null_line_null_word*TestQuopri.test_decode_null_line_null_word  s    &$'r<   c                *    V P                  R R 4       R# r  r  r?  s   &r9   test_decode_one_wordTestQuopri.test_decode_one_word  s    '7+r<   c                .    V P                  R R RR7       R# )rs  Xru  Nr  r?  s   &r9   test_decode_one_word_eol#TestQuopri.test_decode_one_word_eol  s    '74r<   c                *    V P                  R R4       R# hello
hello
Nr  r?  s   &r9   test_decode_one_lineTestQuopri.test_decode_one_line      +y1r<   c                *    V P                  R R 4       R# r  Nr  r?  s   &r9   test_decode_one_line_lf"TestQuopri.test_decode_one_line_lf      )Y/r<   c                *    V P                  R R4       R# )zhellor  Nr  r?  s   &r9   test_decode_one_line_cr"TestQuopri.test_decode_one_line_cr  r	  r<   c                .    V P                  R RRR7       R# )r  helloXr  ru  Nr  r?  s   &r9   test_decode_one_line_nl"TestQuopri.test_decode_one_line_nl  s    )X37r<   c                .    V P                  R RRR7       R# )r  r	  r  ru  Nr  r?  s   &r9   test_decode_one_line_crnl$TestQuopri.test_decode_one_line_crnl  s    +xS9r<   c                *    V P                  R R4       R# )r  r  Nr  r?  s   &r9   test_decode_one_line_one_word(TestQuopri.test_decode_one_line_one_word  s    *N;r<   c                .    V P                  R RRR7       R# )r  helloXworldr  ru  Nr  r?  s   &r9   !test_decode_one_line_one_word_eol,TestQuopri.test_decode_one_line_one_word_eol  s    *MsCr<   c                *    V P                  R R4       R# )hello
world
hello
world
Nr  r?  s   &r9   test_decode_two_lines TestQuopri.test_decode_two_lines  s    .0@Ar<   c                .    V P                  R RRR7       R# )r	  helloXworldXr  ru  Nr  r?  s   &r9   test_decode_two_lines_eol$TestQuopri.test_decode_two_lines_eol   s    .CHr<   c                *    V P                  RR4       R# )SpamN  SpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamr  r?  s   &r9   test_decode_one_long_line$TestQuopri.test_decode_one_long_line  s    ,5r<   c                *    V P                  R R4       R# )r,   r+   Nr  r?  s   &r9   test_decode_one_space TestQuopri.test_decode_one_space  s    #r"r<   c                *    V P                  RR4       R# )r,   r+   Nz     r  r?  s   &r9   test_decode_multiple_spaces&TestQuopri.test_decode_multiple_spaces	  s    '2&r<   c                *    V P                  R R4       R# )zhello    
r  Nr  r?  s   &r9   $test_decode_one_line_trailing_spaces/TestQuopri.test_decode_one_line_trailing_spaces  s    /95r<   c                *    V P                  R R4       R# )zhello    
world   
r	  Nr  r?  s   &r9   %test_decode_two_lines_trailing_spaces0TestQuopri.test_decode_two_lines_trailing_spaces  s    57GHr<   c                *    V P                  R R4       R# )z=22quoted=20words=22z"quoted words"Nr  r?  s   &r9   test_decode_quoted_word"TestQuopri.test_decode_quoted_word  s    02BCr<   c                *    V P                  R R4       R# )zab=CD=EF   abÍïNr  r?  s   &r9   test_decode_uppercase_quoting(TestQuopri.test_decode_uppercase_quoting      *l3r<   c                *    V P                  R R4       R# )zab=cd=efr1	  Nr  r?  s   &r9   test_decode_lowercase_quoting(TestQuopri.test_decode_lowercase_quoting  r4	  r<   c                *    V P                  R R4       R# )zsoft line=
breakzsoft linebreakNr  r?  s   &r9   test_decode_soft_line_break&TestQuopri.test_decode_soft_line_break  s    /1ABr<   c                *    V P                  R R 4       R# )zA=1,B=A ==> A+B==2Nr  r?  s   &r9   test_decode_false_quoting$TestQuopri.test_decode_false_quoting  s    .0DEr<   c                
   / pVf   ^LpMW5R&   Vf   RpMWER&   \         P                  ! V3/ VB pV P                  Wb4       VR8X  g   VR8X  d5   VP                  4        F  pV P	                  \        V4      V4       K   	  R # R # )Nr  r*   rv  r   )r"   rx  r2   r  rh  rj  )r6   r  expected_encoded_bodyr  rv  kwargsencoded_bodyr  s   &&&&&   r9   _test_encodeTestQuopri._test_encode!  s    J#-< ;C5M!--d=f==$;#- %//1$$SY
; 2 (r<   c                *    V P                  R R 4       R# rh  rB	  r?  s   &r9   test_encode_nullTestQuopri.test_encode_null5  r  r<   c                *    V P                  R R 4       R# )z

NrE	  r?  s   &r9   test_encode_null_lines!TestQuopri.test_encode_null_lines8  s    &&)r<   c                *    V P                  R R 4       R# r  rE	  r?  s   &r9   test_encode_one_lineTestQuopri.test_encode_one_line;  r	  r<   c                *    V P                  R R4       R# r  rE	  r?  s   &r9   test_encode_one_line_crlf$TestQuopri.test_encode_one_line_crlf>  r  r<   c                .    V P                  R RRR7       R# )r  r  r   ru  NrE	  r?  s   &r9   test_encode_one_line_eol#TestQuopri.test_encode_one_line_eolA  s    )[f=r<   c                j    V P                  R P                  R4      P                  R4      RRR7       R# )u   helloυ
rZ   latin1zhello=CF=85
r   ru  N)rB	  r   r]   r?  s   &r9   (test_encode_one_line_eol_after_non_ascii3TestQuopri.test_encode_one_line_eol_after_non_asciiD  s2    /009@@J+ 	 	9r<   c                *    V P                  R R4       R# )r,   z=20NrE	  r?  s   &r9   test_encode_one_space TestQuopri.test_encode_one_spaceI  s    #u%r<   c                *    V P                  R R4       R# ) 
z=20
NrE	  r?  s   &r9   test_encode_one_line_one_space)TestQuopri.test_encode_one_line_one_spaceL  s    %)r<   c                *    V P                  R R4       R# )z 
 
z=20
=20
NrE	  r?  s   &r9   test_encode_two_lines_one_space*TestQuopri.test_encode_two_lines_one_spaceT  s    (L1r<   c                *    V P                  R R4       R# )zhello   z
hello  =20NrE	  r?  s   &r9   $test_encode_one_word_trailing_spaces/TestQuopri.test_encode_one_word_trailing_spacesW  r4	  r<   c                *    V P                  R R4       R# )z	hello   
zhello  =20
NrE	  r?  s   &r9   $test_encode_one_line_trailing_spaces/TestQuopri.test_encode_one_line_trailing_spacesZ  s    ,7r<   c                *    V P                  R R4       R# )zhello  	z
hello  =09NrE	  r?  s   &r9   !test_encode_one_word_trailing_tab,TestQuopri.test_encode_one_word_trailing_tab]  s    +|4r<   c                *    V P                  R R4       R# )z	hello  	
zhello  =09
NrE	  r?  s   &r9   !test_encode_one_line_trailing_tab,TestQuopri.test_encode_one_line_trailing_tab`  s    -8r<   c                .    V P                  R R^R7       R# )
abcd 
1234zabcd =

1234r  NrE	  r?  s   &r9   ,test_encode_trailing_space_before_maxlinelen7TestQuopri.test_encode_trailing_space_before_maxlinelenc  s    -)9aHr<   c                .    V P                  R R^R7       R# )ro	  zabcd=
=20
1234r  NrE	  r?  s   &r9   (test_encode_trailing_space_at_maxlinelen3TestQuopri.test_encode_trailing_space_at_maxlinelenf      -);Jr<   c                .    V P                  R R^R7       R# )ro	  zabc=
d=20
1234r  NrE	  r?  s   &r9   ,test_encode_trailing_space_beyond_maxlinelen7TestQuopri.test_encode_trailing_space_beyond_maxlineleni  ru	  r<   c                *    V P                  RR4       R# )r\	  Nz
 
 
 
 
 
z=20
=20
=20
=20
=20
rE	  r?  s   &r9   test_encode_whitespace_lines'TestQuopri.test_encode_whitespace_linesl  s    )[1r<   c                *    V P                  R R4       R# )za = bza =3D bNrE	  r?  s   &r9   test_encode_quoted_equals$TestQuopri.test_encode_quoted_equalso  s    '9-r<   c                *    V P                  RR4       R# )r  Ndxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxrE	  r?  s   &r9   test_encode_one_long_string&TestQuopri.test_encode_one_long_stringr  s    )%@Ar<   c                *    V P                  RR4       R# )r  Nzexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
zgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxx
rE	  r?  s   &r9   test_encode_one_long_line$TestQuopri.test_encode_one_long_lineu  s    *,NOr<   c                *    V P                  RR4       R# )r  Nzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rE	  r?  s   &r9   test_encode_one_very_long_line)TestQuopri.test_encode_one_very_long_linex  s    *8	:r<   c                .    V P                  RR^R7       R# )r  r  Nz=====z=3D=
=3D=
=3D=
=3D=
=3DrE	  r?  s   &r9   test_encode_shortest_maxlinelen*TestQuopri.test_encode_shortest_maxlinelen|  s    '#7AFr<   c                N    V P                  \        V P                  R R ^R7       R# )r+   r  N)r   r  rB	  r?  s   &r9    test_encode_maxlinelen_too_small+TestQuopri.test_encode_maxlinelen_too_small  s!    *d&7&7RANr<   c                   V P                   pV! \        P                  ! R 4      R 4       V! \        P                  ! R4      R4       V! \        P                  ! R4      R4       V! \        P                  ! R^(R7      R4       V! \        P                  ! R^(RR7      R4       V! \        P                  ! R	4      R	4       R
# )r+   rs  r  r  r  zjxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20r   r  zlxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20zone line

two lineNdxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx )r2   r"   rx  r	  s   & r9   r  TestQuopri.test_encode  s    
:!!"%r*
:!!'*G4
:!!"23^D
:!!,2> A 	
 	:!!,26J	
 	:!! # 	r<   )r  r  r  r  rm   )NN)IrY  rZ  r[  r\  r@  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r	  r
	  r	  r	  r	  r	  r	  r"	  r%	  r(	  r+	  r.	  r2	  r6	  r9	  r<	  rB	  rF	  rI	  rL	  rO	  rR	  rV	  rY	  r]	  r`	  rc	  rf	  ri	  rl	  rp	  rs	  rw	  rz	  r}	  r	  r	  r	  r	  r	  r  r]  r^  r_  s   @r9   r  r  \  sr    6,LJ.26I
B*EBB&B)3BDK4"(,52008:<DBI6#'6ID44CF<("*02>9
&*24859IKK2.BP:GO r<   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestCharseti  c                R    ^ RI Hp  VP                  R R#   \         d     R# i ; i)r   r~  fakeN)r   rB   CHARSETSr  )r6   CharsetModules   & r9   tearDownTestCharset.tearDown  s*    2	&&v. 		s    &&c                    V P                   p\        R 4      pV! VP                  R4      R4       RpV P                  \        VP                  V4       \        R4      pV! VP                  V4      R4       R# )rP   Hello World!u   ¤¢¤¤¤¦¤¨¤ªrZ   z(=?utf-8?b?wqTCosKkwqTCpMKmwqTCqMKkwqo=?=N)r2   r
   r[  r   rk  )r6   r7   r   r   s   &   r9   test_codec_encodeable!TestCharset.test_codec_encodeable  sc    J
1??>*N;6,;G
1??1IJr<   c                   V P                   p\        R 4      pV! RVP                  R4      4       \        R4      pV! RVP                  R4      4       \        R4      pV! RVP                  R4      4       \        R4      p^ R	IHp VP                  R
VP                  RR4       \        R
4      pV! RVP                  R4      4       R# )r>   zhello w=F6rldu   hello wörldrZ   r  r   rP   ru  r{  r~  r	  N)r2   r
   rx  r   rB   add_charsetQP)r6   r7   r   r	  s   &   r9   test_body_encodeTestCharset.test_body_encode  s    L!
?AMM*:;<G
~!>?J
=!--67H 	3!!&-*:*:D'JFO
=!--67r<   c                    \        R 4      pV P                  \        V4      R 4       V P                  \        P
                  \         R4       R# )rP   u   ascÿiiN)r
   r2   r   r   r    CharsetErrorr  s   & r9   test_unicode_charset_name%TestCharset.test_unicode_charset_name  s8    *%Wz2&--wDr<   rX  N)
rY  rZ  r[  r\  r	  r	  r	  r	  r]  r^  r_  s   @r9   r	  r	    s!     	K8>E Er<   r	  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )
TestHeaderi  c                    V P                   p\        R 4      pV! VP                  4       R 4       VP                  R4       V! VP                  4       R4       R# )r	  z Goodbye World!zHello World!  Goodbye World!Nr  r   r   r  r  s   &  r9   test_simpleTestHeader.test_simple  sE    "">"
188:~&	"#
188:56r<   c                    V P                   p\        R 4      pV! VP                  4       R 4       VP                  R4       V! VP                  4       R4       R# )r	  zGoodbye World!zHello World! Goodbye World!Nr	  r  s   &  r9   test_simple_surpriseTestHeader.test_simple_surprise  sE    "">"
188:~&	!"
188:45r<   c                F    R pV P                  \        V4      VR3.4       R# )zno decoding neededNr  r  s   & r9   test_header_needs_no_decoding(TestHeader.test_header_needs_no_decoding  s"     q)QI;7r<   c                    \        R ^LR7      pVP                  RR7      P                  R4       F  pV P                  \	        V4      ^L4       K   	  R# )a  I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.r  r,   )
splitcharsz
 N)r   r   r   rh  rj  )r6   r  ls   &  r9   	test_longTestHeader.test_long  sI      L "S)//6A  Q, 7r<   c                >   V P                   p\        R 4      p\        R4      p\        R4      pRpRpRp\        WR4      pVP                  Wc4       VP                  Wt4       VP	                  ^LR7      p	V! V	R4       \        V	4      p
V! \        V
4      ^4       V! V
^ ,          VR 34       V! V
^,          VR34       V! V
^,          VP	                  R4      R34       \        V4      pV! VRP                  R4      4       \        \        V	4      4      pV! W4       R	# )
r>   r|   rZ   r  r  r  r  a  =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerderband_kom?=
 =?iso-8859-1?q?fortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndischen_Wand?=
 =?iso-8859-1?q?gem=E4lden_vorbei=2C_gegen_die_rotierenden_Klingen_bef=F6r?=
 =?iso-8859-1?q?dert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se_hroutily?=
 =?iso-8859-2?q?_pod_tlakem_jejich_d=F9vtipu=2E=2E_?= =?utf-8?b?5q2j56K6?=
 =?utf-8?b?44Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb44KT44CC?=
 =?utf-8?b?5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go44Gv44Gn?=
 =?utf-8?b?44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBpc3QgZGFz?=
 =?utf-8?b?IE51bnN0dWNrIGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWloZXJodW5k?=
 =?utf-8?b?IGRhcyBPZGVyIGRpZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI3jgajoqIA=?=
 =?utf-8?b?44Gj44Gm44GE44G+44GZ44CC?=s  Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an südlündischen Wandgemälden vorbei, gegen die rotierenden Klingen befördert. Finančni metropole se hroutily pod tlakem jejich důvtipu.. 正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.」と言っています。N)
r  r
   r   r  r   r   rj  r   r]   r   )r6   r7   r   r  r  r  r  r  r  encr  ustrnewhs   &            r9   test_multilingualTestHeader.test_multilingual  s   ""L!\"wB$0	 6		!hh"h%
3 ) 	*  $
3w<
71:-.
71:./
71:	((17;<1v
4D  fWo#	& =-.
4r<   c                Z    \        4       pV P                  VP                  4       R 4       R# rh  r  r  s   & r9   test_empty_header_encode#TestHeader.test_empty_header_encode0  s    HR(r<   c                    V P                   p\        4       pV! VR 4       VP                  R\        R4      4       V! VR4       R# )r+   r   r>   N)r  r   r  r
   r  s   &  r9   test_header_ctor_default_args(TestHeader.test_header_ctor_default_args4  s9    ""H
1b		-.
1er<   c                d   V P                   pR p\        V4      pV! VP                  4       R4       V! \        V4      V4       \        VRR7      pV! VP                  4       R4       V! \        V4      V4       \        VRRR7      pV! VP                  4       V4       V! \        V4      V4       R# )z|A very long line that must get split to something other than at the 76th character boundary to test the non-default behaviorz}A very long line that must get split to something other than at the 76th
 character boundary to test the non-default behaviorrJ  r  z}A very long line that must get split to something other than at the
 76th character boundary to test the non-default behaviori   )r  r  N)r  r   r   r   r  s   &   r9   test_explicit_maxlinelen#TestHeader.test_explicit_maxlinelen;  s    "" 4L
188: 8 	9 	3q644Y/
188: = 	> 	3q644Di@
188:t
3q64r<   c           
        V P                   p\        R ^R7      pRpVP                  V4       VP                  4       pV! VR4       V! V\	        \        \        V4      4      4      4       \        R ^(R7      pVP                  R4       VP                  4       pV! VR4       V! V\	        \        \        V4      4      4      4       R# )r>   rB   r  a  =?iso-8859-1?q?xxx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_?=z=?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xxx?=
 =?iso-8859-1?q?x_xxxx_xxxx_xxxx_xxxx_?=
 =?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xx?=
 =?iso-8859-1?q?xx_xxxx_xxxx_xxxx_xxxx?=
 =?iso-8859-1?q?_xxxx_xxxx_?=Nr	  r  r   r  r   r   r   r   r6   r7   r  r  r   s   &    r9   test_quopri_splittable!TestHeader.test_quopri_splittableN  s    ""<B7	HHJ
1 2 2	f 	1c+mA./01<B7	HHJ
1 ! 	" 	1c+mA./01r<   c           
        V P                   p\        R ^R7      pRpVP                  V4       VP                  4       pV! VR4       V! V\	        \        \        V4      4      4      4       \        R ^(R7      pVP                  V4       VP                  4       pV! VR4       V! V\	        \        \        V4      4      4      4       R# )r}   r	  a  =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IA==?=z=?koi8-r?b?eHh4eCB4eHh4IHh4eHggeHh4?=
 =?koi8-r?b?eCB4eHh4IHh4eHggeHh4eCB4?=
 =?koi8-r?b?eHh4IHh4eHggeHh4eCB4eHh4?=
 =?koi8-r?b?IHh4eHggeHh4eCB4eHh4IHh4?=
 =?koi8-r?b?eHggeHh4eCB4eHh4IHh4eHgg?=
 =?koi8-r?b?eHh4eCB4eHh4IA==?=Nr	  r	  r	  s   &    r9   test_base64_splittable!TestHeader.test_base64_splittable  s    ""83	HHJ
1 " "	F 	1c+mA./0183	HHJ
1 " 	# 	1c+mA./01r<   c                    V P                   pR p\        V4      pV! VR.4       \        V4      pV! W$P                  4       4       R# )rs  Nr  r2   r   r   r   )r6   r7   r   r  r  s   &    r9   test_us_ascii_headerTestHeader.test_us_ascii_header  s@    !
1 N
1hhjr<   c                h    V P                   p\        4       pVP                  R R4       V! VR 4       R# )rs  r>   N)r2   r   r  r  s   &  r9   test_string_charsetTestHeader.test_string_charset  s+    H	,'
1gr<   c                    V P                   p\        R R4      pV! VP                  4       R4       \        RR4      pV! VP                  4       R4       R# )r  rZ   z=?utf-8?q?p=C3=B6stal?=u   菊地時夫z=?utf-8?b?6I+K5Zyw5pmC5aSr?=Nr2   r   r   r  s   &  r9   test_utf8_shortestTestHeader.test_utf8_shortest  sH    ;(
188:01-w7
188:56r<   c           	     J   V P                   pV P                  pR pV! \        \        V4       \        4       pV! \        VP                  V4       VP                  RR4      pV! \        \        VRR7      4      V4       VP	                  VRR7       V! \        V4      V4       R# )0   Ynwp4dUEbay Auction Semiar- No Charge  Earn BigrZ   r  r   N)r   r2   rk  r   r  r]   r   )r6   r  r7   r  r  es   &     r9   test_bad_8bit_headerTestHeader.test_bad_8bit_header  s    ""B|VQ'H|QXXq)HHWi(
3va	*+Q/	9%
3q61r<   c                   R pVP                  RR4      p\        V\        P                  P                  R7      pV P                  \        V4      R4       V P                  \        P                  P                  V4      VR3.4       R# )r	  r   surrogateescaper~  2   Ynwp4dUEbay Auction Semiar- No Charge � Earn Bigunknown-8bitN)	r]   r   r   rB   UNKNOWN8BITr2   r   r   r   )r6   r  r	  r  s   &   r9   test_escaped_8bit_header#TestHeader.test_escaped_8bit_header  sm    BHHW/01emm778QO	Q33A6!^9L8MNr<   c                    R p\        V\        P                  P                  R7      pV P	                  \        V4      R4       V P	                  \        P                  P                  V4      VR3.4       R# r	  r~  r	  r	  N)r   r   rB   r	  r2   r   r   r   )r6   r  r  s   &  r9   &test_header_handles_binary_unknown8bit1TestHeader.test_header_handles_binary_unknown8bit  s\    B1emm778QO	Q33A6!^9L8MNr<   c                f   R p\        V\        P                  P                  R7      p\        P                  P                  \        P                  P                  V4      4      pV P                  \        V4      R4       V P                  \        P                  P                  V4      VR3.4       R# r	  )	r   r   rB   r	  r   r   r   r2   r   )r6   r  r  h2s   &   r9   +test_make_header_handles_binary_unknown8bit6TestHeader.test_make_header_handles_binary_unknown8bit  s    B1emm778\\%%ell&@&@&CDRO	Q33B71n:M9NOr<   c                    \        R 4      p\        P                  P                  V4      pVP	                  R4       V P                  \        V4      R 4       R# )r   N)r   test2)r   r   r   r   r  r2   r   )r6   r  rm  s   &  r9   0test_modify_returned_list_does_not_change_header;TestHeader.test_modify_returned_list_does_not_change_header
  s@    6N++A.()Q(r<   c                    V P                   p\        4       pVP                  R R4       VP                  R4       VP                  4       pV! VR4       \	        \        V4      4      pV! VP                  4       V4       R# )rs  r>   worldz=?iso-8859-1?q?hello?= worldN)r2   r   r  r   r   r   )r6   r7   r  r   s   &   r9    test_encoded_adjacent_nonencoded+TestHeader.test_encoded_adjacent_nonencoded  sc    H	,'	HHJ
1,-a()
188:qr<   c                    V P                   pR p\        V4      pV! V. RO4       \        V4      pV! VP                  4       R4       R# )zGSubject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztk=?= =?koi8-r?q?=CA?= zz.Nz6Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztnK?= zz.))s	   Subject: N)s     r}   )s    zz.Nr	  )r6   r7   r   partshdrs   &    r9   test_whitespace_keeper!TestHeader.test_whitespace_keeper  sK    Ua 
5  Y  	Z% 
3::<C	Er<   c                Z    V P                   pR pV! \        P                  \        V4       R# )zXSubject: =?EUC-KR?B?CSixpLDtKSC/7Liuvsax4iC6uLmwMcijIKHaILzSwd/H0SC8+LCjwLsgv7W/+Mj3I ?=N)r   r    r   r   )r6   r  r   s   &  r9   test_broken_base64_header$TestHeader.test_broken_base64_header#  s$    ""fv&&q9r<   c                `    \        R RR7      pV P                  VP                  4       R4       R# )r  	shift_jisr~  r  Nr  r  s   & r9   test_shift_jis_charset!TestHeader.test_shift_jis_charset(  s%    5+.%EFr<   c                h    \         P                  ! R 4      pV P                  \        V4      R4       R# )zEmptyHeader:zEmptyHeader: 

N)r   r  r2   r   ro   s   & r9   !test_flatten_header_with_no_value,TestHeader.test_flatten_header_with_no_value,  s)     ''7S#67r<   c                Z    \        4       pR VR&   V P                  \        V4      R4       R# )z   value with leading ws
SomeHeaderz&SomeHeader:    value with leading ws

N)r   r2   r   ro   s   & r9   )test_encode_preserves_leading_ws_on_value4TestHeader.test_encode_preserves_leading_ws_on_value3  s(    i6LS#MNr<   c                X    V P                  \        R 4      P                  4       R 4       R# )r,   Nr	  r?  s   &r9   test_whitespace_header!TestHeader.test_whitespace_header8  s    ++-s3r<   rX  N)rY  rZ  r[  r\  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r
  r
  r
  r
  r]  r^  r_  s   @r9   r	  r	    s     768-=~)&C2J42l7
OOP)E:
G8O
4 4r<   r	  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"V t#R!# )"TestRFC2231i>  c                    V P                   pV P                  R 4      pV! VP                  R4      R4       V! VP                  RRR7      R4       R# )z
msg_29.txtr  FrN  NrP   r  %This is even more ***fun*** isn't it!)rP   r  z'"This is even more ***fun*** isn't it!")r2   r3   rJ   r5   s   &  r9   rG  TestRFC2231.test_get_paramB  sM    ll<(
3==!G	I
3==%=0I	Kr<   c                b   V P                   p\        4       pVP                  R RRR7       V! VP                  R 4      R
4       VP                  R RRRR7       V! VP                  R 4      R4       V P	                  R4      pVP                  R RRRR7       V! VP                  ^NR7      R4       R	# )r  r
  rP   r~  r  rB   languager   r	  a"  Return-Path: <bbb@zzz.org>
Delivered-To: bbb@zzz.org
Received: by mail.zzz.org (Postfix, from userid 889)
	id 27CEAD38CC; Fri,  4 May 2001 14:05:44 -0400 (EDT)
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Message-ID: <15090.61304.110929.45684@aaa.zzz.org>
From: bbb@ddd.com (John X. Doe)
To: bbb@zzz.org
Subject: This is a test message
Date: Fri, 4 May 2001 14:05:44 -0400
Content-Type: text/plain; charset=us-ascii;
 title*=us-ascii'en'This%20is%20even%20more%20%2A%2A%2Afun%2A%2A%2A%20isn%27t%20it%21


Hi,

Do you like this message?

-Me
N)rP   r+   r
  r
  )r  r   ra  rJ   r3   r   r5   s   &  r9   rb  TestRFC2231.test_set_paramJ  s    ""igG( 	 	*
3==!E	GgG(4 	 	9
3==!G	Ill<(gG(4 	 	9
3==b=) , 	r<   c                $   \        4       pVP                  R R4       V P                  VR,          R4       VP                  R RRR7       V P                  VR,          R4       VP                  R RRR7       V P                  VR,          R	4       R
# )r  r   rA   ztext/plain; title="foo"r8  F)requoteztext/plain; title=barz	(bar)bellztext/plain; title="(bar)bell"N)r   ra  r2   ro   s   & r9   test_set_param_requote"TestRFC2231.test_set_param_requoteo  s}    igu%^,.GHgue4^,.EFg{E:^,.MNr<   c                    V P                   pV P                  R 4      pVP                  RRRRR7       VP                  RRRRR7       VP                  RRR	7       V! VP	                  ^NR
7      R4       R# )r   r   r8  rP   r  r
  r  r
  rE   r5  r	  a$  Return-Path: <bbb@zzz.org>
Delivered-To: bbb@zzz.org
Received: by mail.zzz.org (Postfix, from userid 889)
	id 27CEAD38CC; Fri,  4 May 2001 14:05:44 -0400 (EDT)
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Message-ID: <15090.61304.110929.45684@aaa.zzz.org>
From: bbb@ddd.com (John X. Doe)
To: bbb@zzz.org
Subject: This is a test message
Date: Fri, 4 May 2001 14:05:44 -0400
Content-Type: text/plain; charset="us-ascii";
 title*=us-ascii'en'This%20is%20even%20more%20%2A%2A%2Afun%2A%2A%2A%20isn%27t%20it%21


Hi,

Do you like this message?

-Me
N)r  r3   ra  rl  r   r5   s   &  r9   rn  TestRFC2231.test_del_paramy  st    ""ll<(eUJFgG 	 	/eN3
3==b=) , 	r<   c                n    V P                   pV P                  R 4      pV! VP                  4       R4       R# )r  rP   N)r2   r3   get_content_charsetr5   s   &  r9    test_rfc2231_get_content_charset,TestRFC2231.test_rfc2231_get_content_charset  s.    ll<(
3""$j1r<   c                    \         P                  ! R 4      p\        P                  ! V4      pV P	                  VP                  4       R4       V P	                  WP                  4       4       R# )z            Content-Disposition: inline;
            	filename*0*=''This%20is%20even%20more%20;
            	filename*1*=%2A%2A%2Afun%2A%2A%2A%20;
            	filename*2="is it not.pdf"

            )This is even more ***fun*** is it not.pdfNr   r   r   r  r2   r   r   r  s   &  r9   test_rfc2231_parse_rfc_quoting*TestRFC2231.test_rfc2231_parse_rfc_quoting  X    OO   ''*))+D	FMMO,r<   c                    \         P                  ! R 4      p\        P                  ! V4      pV P	                  VP                  4       R4       V P	                  WP                  4       4       R# )z            Content-Disposition: inline;
            	filename*0*="''This%20is%20even%20more%20";
            	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
            	filename*2="is it not.pdf"

            r"
  Nr#
  r  s   &  r9    test_rfc2231_parse_extra_quoting,TestRFC2231.test_rfc2231_parse_extra_quoting  r&
  r<   c                    R p\         P                  ! V4      pVP                  R4      pV P                  V\        4       V P                  VR4       R# )a  Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm"
Content-Type: text/html; NAME*0=file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEM; NAME*1=P_nsmail.htm

NAMEzMfile____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htmNr   r  rJ   assertNotIsInstancetupler2   r6   r   r8   params   &   r9   #test_rfc2231_no_language_or_charset/TestRFC2231.test_rfc2231_no_language_or_charset  sN     ''*f%  .[	]r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# zContent-Disposition: inline;
	filename*0*="''This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

r"
  Nr'  r  s   &  r9   /test_rfc2231_no_language_or_charset_in_filename;TestRFC2231.test_rfc2231_no_language_or_charset_in_filename  8     ''*))+D	Fr<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# r4
  r'  r  s   &  r9   7test_rfc2231_no_language_or_charset_in_filename_encodedCTestRFC2231.test_rfc2231_no_language_or_charset_in_filename_encoded  r7
  r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Disposition: inline;
	filename*0="''This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

z1This%20is%20even%20more%20***fun*** is it not.pdfNr'  r  s   &  r9   test_rfc2231_partly_encoded'TestRFC2231.test_rfc2231_partly_encoded  s9     ''*?	Ar<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Disposition: inline;
	filename*0="This%20is%20even%20more%20";
	filename*1="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

z?This%20is%20even%20more%20%2A%2A%2Afun%2A%2A%2A%20is it not.pdfNr'  r  s   &  r9   test_rfc2231_partly_nonencoded*TestRFC2231.test_rfc2231_partly_nonencoded  s9     ''*M	Or<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Type: multipart/alternative;
	boundary*0*="''This%20is%20even%20more%20";
	boundary*1*="%2A%2A%2Afun%2A%2A%2A%20";
	boundary*2="is it not.pdf"

r"
  Nr/  r  s   &  r9   /test_rfc2231_no_language_or_charset_in_boundary;TestRFC2231.test_rfc2231_no_language_or_charset_in_boundary  r7
  r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Type: text/plain;
	charset*0*="This%20is%20even%20more%20";
	charset*1*="%2A%2A%2Afun%2A%2A%2A%20";
	charset*2="is it not.pdf"

z)this is even more ***fun*** is it not.pdfNr   r  r2   r
  r  s   &  r9   .test_rfc2231_no_language_or_charset_in_charset:TestRFC2231.test_rfc2231_no_language_or_charset_in_charset  s8     ''*002D	Fr<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Disposition: inline;
	filename*0*="bogus'xx'This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

r"
  Nr'  r  s   &  r9   %test_rfc2231_bad_encoding_in_filename1TestRFC2231.test_rfc2231_bad_encoding_in_filename  r7
  r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )z:Content-Type: text/plain; charset*=bogus''utf-8%E2%80%9D

NrE
  r  s   &  r9   $test_rfc2231_bad_encoding_in_charset0TestRFC2231.test_rfc2231_bad_encoding_in_charset(  6     ''* 	002D9r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )z:Content-Type: text/plain; charset*=ascii''utf-8%E2%80%9D

NrE
  r  s   &  r9   %test_rfc2231_bad_character_in_charset1TestRFC2231.test_rfc2231_bad_character_in_charset2  rN
  r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zContent-Disposition: inline;
	filename*0*="ascii'xx'This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2*="is it not.pdf%E2"

u,   This is even more ***fun*** is it not.pdf�Nr'  r  s   &  r9   &test_rfc2231_bad_character_in_filename2TestRFC2231.test_rfc2231_bad_character_in_filename<  s8     ''*))+J	Lr<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )z^Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename*=X-UNKNOWN''myfile.txt


myfile.txtNr'  r  s   &  r9   test_rfc2231_unknown_encoding)TestRFC2231.test_rfc2231_unknown_encodingH  4    
 ''*))+\:r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )uc   Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename*=utf-8''myfile.txt

rV
  Nr'  r  s   &  r9   &test_rfc2231_bad_character_in_encoding2TestRFC2231.test_rfc2231_bad_character_in_encodingQ  rY
  r<   c                    V P                   pR p\        P                  ! V4      pVP                  R4      w  rEpV! VR4       V! VR4       V! VR4       R# )zJContent-Type: application/x-foo;
	name*0*="Frank's"; name*1*=" Document"

rJ  NFrank's DocumentrF  r6   r7   r   r8   rB   r
  r   s   &      r9   -test_rfc2231_single_tick_in_filename_extended9TestRFC2231.test_rfc2231_single_tick_in_filename_extendedZ  sX    
 ''*"}}V41
7D
8T
1 !r<   c                    R p\         P                  ! V4      pVP                  R4      pV P                  V\        4       V P                  VR4       R# )zGContent-Type: application/x-foo; name*0="Frank's"; name*1=" Document"

rJ  r^
  Nr,
  r/
  s   &   r9   $test_rfc2231_single_tick_in_filename0TestRFC2231.test_rfc2231_single_tick_in_filenameh  sJ     ''*f%  . 23r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zAContent-Disposition: inline;
	filename*0*="'This%20is%20broken";
z'This is brokenNr'  r  s   &  r9   test_rfc2231_missing_tick%TestRFC2231.test_rfc2231_missing_tickr  s8     ''*	r<   c                v    R p\         P                  ! V4      pV P                  VP                  4       R4       R# )zAContent-Disposition: inline;
	filename*0*="'This%20is%E2broken";
u   'This is�brokenNr'  r  s   &  r9   0test_rfc2231_missing_tick_with_encoded_non_ascii<TestRFC2231.test_rfc2231_missing_tick_with_encoded_non_ascii|  s8     ''*"	$r<   c                    V P                   pR p\        P                  ! V4      pVP                  R4      w  rEpV! VR4       V! VR4       V! VR4       R# )zYContent-Type: application/x-foo;
	name*0*="us-ascii'en-us'Frank's"; name*1*=" Document"

rJ  rP   en-usr^
  NrF  r_
  s   &      r9   !test_rfc2231_tick_attack_extended-TestRFC2231.test_rfc2231_tick_attack_extended  sX    
 ''*"}}V41
7J
8W
1 !r<   c                    R p\         P                  ! V4      pVP                  R4      pV P                  V\        4       V P                  VR4       R# )zWContent-Type: application/x-foo;
	name*0="us-ascii'en-us'Frank's"; name*1=" Document"

rJ  zus-ascii'en-us'Frank's DocumentNr,
  r/
  s   &   r9   test_rfc2231_tick_attack$TestRFC2231.test_rfc2231_tick_attack  sJ    
 ''*f%  . ABr<   c                ~    V P                   pR p\        P                  ! V4      pV! VP                  R4      R4       R# )z:Content-Type: application/x-foo; name="Frank's Document"

rJ  r^
  NrF  r1  s   &   r9   test_rfc2231_no_extended_values+TestRFC2231.test_rfc2231_no_extended_values  s:     ''*
3== "45r<   c                    V P                   pR p\        P                  ! V4      pVP                  R4      w  rEpV! VR4       V! VR4       V! VR4       R# )ziContent-Type: application/x-foo;
	name*0*="us-ascii'en-us'My";
	name*1=" Document";
	name*2*=" For You"

rJ  rP   rl
  My Document For YouNrF  r_
  s   &      r9   ,test_rfc2231_encoded_then_unencoded_segments8TestRFC2231.test_rfc2231_encoded_then_unencoded_segments  X     ''*"}}V41
7J
8W
1#$r<   c                    V P                   pR p\        P                  ! V4      pVP                  R4      w  rEpV! VR4       V! VR4       V! VR4       R# )ziContent-Type: application/x-foo;
	name*0="us-ascii'en-us'My";
	name*1*=" Document";
	name*2*=" For You"

rJ  rP   rl
  rv
  NrF  r_
  s   &      r9   ,test_rfc2231_unencoded_then_encoded_segments8TestRFC2231.test_rfc2231_unencoded_then_encoded_segments  ry
  r<   c                    R R.pV F<  pV P                  VR7      ;_uu_ 4        \        P                  ! V4      pRRR4       K>  	  R#   + '       g   i     KS  ; i)zFrom: user@host.com
To: user@host.com
Bad-Header:
 =?us-ascii?Q?LCSwrV11+IB0rSbSker+M9vWR7wEDSuGqmHD89Gt=ea0nJFSaiz4vX3XMJPT4vrE?=
 =?us-ascii?Q?xGUZeOnp0o22pLBB7CYLH74Js=wOlK6Tfru2U47qR?=
 =?us-ascii?Q?72OfyEY2p2=2FrA9xNFyvH+fBTCmazxwzF8nGkK6D?=

Hello!
u  From: ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ <xxx@xxx>
To: "xxx" <xxx@xxx>
Subject:   ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½
MIME-Version: 1.0
Content-Type: text/plain; charset="windows-1251";
Content-Transfer-Encoding: 8bit

ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½
)r   N)r%  r   r  )r6   messagesr   r8   s   &   r9   +test_should_not_hang_on_invalid_ew_messages7TestRFC2231.test_should_not_hang_on_invalid_ew_messages  sR    " A""//2 #" """s   A		ArX  N)$rY  rZ  r[  r\  rG  rb  r
  rn  r
  r$
  r(
  r1
  r5
  r9
  r<
  r?
  rB
  rF
  rI
  rL
  rP
  rS
  rW
  r[
  r`
  rc
  rf
  ri
  rm
  rp
  rs
  rw
  r{
  r
  r]  r^  r_  s   @r9   r
  r
  >  s     K#JOB2-- ]
F
FAO
FF
F::
L;;"4$"	C6%"%3 3r<   r
  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	
TestSignedi  c                    \        VR R7      ;_uu_ 4       pVP                  4       p\        P                  ! V4      pRRR4       W43#   + '       g   i     XX3# ; irX  rY  )r6   r  r   originalr8   s   &&   r9   _msg_and_objTestSigned._msg_and_obj  sP    h11RwwyH++H5C 2 } 21 }s   'AA	c                   ^ RI pVP                  ! RVP                  VP                  ,          4      pVP	                  V4      P                  ^4      pVP	                  V4      P                  ^4      pV P                  We4       R# )r   Nz^--([^\n]+)\n(.*?)\n--\1$)rl  rm  Sr}  searchgroupr2   )r6   r
  resultrl  repartinpartoutparts   &&&    r9   _signed_parts_eqTestSigned._signed_parts_eq  sb    8"$$+Fx(..q1--'--a0)r<   c                n    V P                  R 4      w  rVP                  4       pV P                  W4       R# r  r
  r   r
  r6   r
  r8   r
  s   &   r9   test_long_headers_as_string&TestSigned.test_long_headers_as_string  s-    )),7h/r<   c                r    V P                  R 4      w  rVP                  ^<R7      pV P                  W4       R# )r  r	  Nr
  r
  s   &   r9   (test_long_headers_as_string_maxheaderlen3TestSigned.test_long_headers_as_string_maxheaderlen  s2    )),7B/h/r<   c                    V P                  R 4      w  r\        4       p\        V4      P                  V4       VP	                  4       pV P                  W4       R# r  )r
  r   r   r   r   r
  )r6   r
  r8   r   r
  s   &    r9   test_long_headers_flatten$TestSigned.test_long_headers_flatten  sF    )),7Z"c"h/r<   rX  N)rY  rZ  r[  r\  r
  r
  r
  r
  r
  r]  r^  r_  s   @r9   r
  r
    s#     *0
0
0 0r<   r
  c                   &   a  ] tR tRt o R tRtV tR# )TestHeaderRegistryi  c                    \        4       pV! R R4      pV P                  VP                  ^ ,          \        P                  4       R# )rq  zattachment; 0*00="foo"N)r   r  r  r    r  )r6   regr  s   &  r9   test_HeaderRegistry&TestHeaderRegistry.test_HeaderRegistry  s6    %'?@aiilF,F,FGr<   rX  N)rY  rZ  r[  r\  r
  r]  r^  r_  s   @r9   r
  r
    s     H Hr<   r
  __main__)grl  r  r[   r  r   ior   r   	itertoolsr   randomr   	threadingr   unittest.mockr	   r   email.policyemail.utilsemail.charsetr
   email.generatorr   r   r   email.headerr   r   r   email.headerregistryr   email.messager   email.mime.applicationr   email.mime.audior   email.mime.baser   email.mime.imager   email.mime.messager   email.mime.multipartr   email.mime.nonmultipartr   email.mime.textr   email.parserr   r   r   r   r    r!   r"   r#   r   r$   test.supportr%   test.support.os_helperr&   test.test_emailr'   r(   r)   r   r=  r  r.   TestCaserb  r  r=  rX  r  r  r  r  rQ  r  r  rN  rV  r  r:  ri  r  r  ra  rj  ro  rq  r  r	  r	  r
  r
  r
  rY  mainrX  r<   r9   <module>r
     s  
 
              ! G G ; ; / ! 2 & $ & * . 4 $ -        ) ) 3 $	fN] fNV?8$$ ?Fx>m x>zK/x(( K/^/DH%% /Dh7DH%% 7DvXC(++ XCx7A8$$ 7Ax~6M ~6BL1 L1bIH- IHZsKm sKn		J} 	J"Z-] Z-~lH lH`d(M d(N-Am -A`QF- QFhjM jZ- -$3%E$238'G'581D"" 1Dh}"" }D
5E(## 5Eta4 a4La3- a3N0 0BH H zMMO r<   