
"Ic            @   s1  d  d k  Z  d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k l Z d  d k	 Z	 d  d k
 l Z d  d k l Z l Z l Z d  d k l Z l Z d  d k l Z l Z d  d k l Z d  d k l Z d  d	 k l Z d  d
 k l Z d  d k l Z d  d k  l! Z! d  d k" l# Z# d  d k$ l% Z% d  d k	 l& Z& d  d k	 l' Z' d  d k	 l( Z( d  d k	 l) Z) d  d k	 l* Z* d  d k	 l+ Z+ d  d k, l- Z- l. Z. d  d k/ l0 Z1 d Z2 d Z3 d Z4 d d  Z5 d e i6 f d     YZ7 d e7 f d     YZ8 d  e i6 f d!     YZ9 d" e7 f d#     YZ: d$ e i6 f d%     YZ; d& e i6 f d'     YZ< d( e i6 f d)     YZ= d* e i6 f d+     YZ> d, e i6 f d-     YZ? d. e7 f d/     YZ@ d0 e7 f d1     YZA d2 e i6 f d3     YZB d4 e7 f d5     YZC d6 e7 f d7     YZD d8 e7 f d9     YZE d: e7 f d;     YZF d< e7 f d=     YZG d> e i6 f d?     YZH d@ e i6 f dA     YZI dB e i6 f dC     YZJ dD e7 f dE     YZK dF e7 f dG     YZL dH   ZM dI   ZN dJ   ZO eP dK j o e iQ dL dM  n d S(N   iN(   t   StringIO(   t   Charset(   t   Headert   decode_headert   make_header(   t   Parsert   HeaderParser(   t	   Generatort   DecodedGenerator(   t   Message(   t   MIMEApplication(   t	   MIMEAudio(   t   MIMEText(   t	   MIMEImage(   t   MIMEBase(   t   MIMEMessage(   t   MIMEMultipart(   t   utils(   t   errors(   t   encoders(   t	   iterators(   t
   base64mime(   t
   quoprimime(   t   findfilet   run_unittest(   t   __file__s   
t    t    t   rc         C   s1   t  i i t  i i t  d |   } t | |  S(   Nt   data(   t   ost   patht   joint   dirnamet   landmarkt   open(   t   filenamet   modeR   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   openfile-   s    $t   TestEmailBasec           B   s   e  Z d    Z d   Z RS(   c         C   s   | | j on t  |  } t  |  } t i | i   | i    } t   } | t It i |  IJ|  i | i    n d S(   s:   Like failUnlessEqual except use ndiff for readable output.N(	   t   strt   difflibt   ndifft
   splitlinesR    t   NLR    t   failureExceptiont   getvalue(   t   selft   firstt   secondt   sfirstt   ssecondt   difft   fp(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   ndiffAssertEqual5   s    	c         C   s7   t  t |   } z t i |  } Wd  | i   X| S(   N(   R&   R   t   emailt   message_from_filet   close(   R/   R$   R5   t   msg(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   _msgobj?   s
    (   t   __name__t
   __module__R6   R;   (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR'   4   s   	
t   TestMessageAPIc           B   s  e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z  d   Z! d    Z" d!   Z# d"   Z$ d#   Z% d$   Z& d%   Z' d&   Z( d'   Z) d(   Z* d)   Z+ d*   Z, d+   Z- d,   Z. d-   Z/ d.   Z0 d/   Z1 d0   Z2 d1   Z3 d2   Z4 RS(3   c         C   sT   |  i  } |  i d  } | | i d  d d d g  | | i d d  d  d  S(   Ns
   msg_20.txtt   ccs   ccc@zzz.orgs   ddd@zzz.orgs   eee@zzz.orgt   xxs   n/a(   t   assertEqualR;   t   get_all(   R/   t   eqR:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_allK   s    	c         C   sL  |  i  } t   } | | i   d   t d  } | i |  | | d d  | | i   d  | | d d  | | i d  d  | | d d	  | | i   i d  | i d   | | i   d   | | d d  t   } d
 | d <d | d <d | d <| i |  | | d d
  | | d d  | | d d  d  S(   Ns
   iso-8859-1s   mime-versions   1.0s
   text/plains   content-types    text/plain; charset="iso-8859-1"t   charsets   content-transfer-encodings   quoted-printables   2.0s   MIME-Versions   text/x-weirds   Content-Types   quinted-puntables   Content-Transfer-Encodings"   text/x-weird; charset="iso-8859-1"(	   RA   R	   t   get_charsett   NoneR   t   set_charsett   get_content_typet	   get_paramt   input_charset(   R/   RC   R:   RE   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_getset_charsetQ   s,    			


c         C   sJ   |  i  } t   } | i d  | | i   i d  | | d d  d  S(   Ns   us-asciis   content-types   text/plain; charset="us-ascii"(   RA   R	   RH   RF   RK   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_charset_from_stringk   s
    		c         C   sB   t    } t d  } | i d |  |  i | i   i d  d  S(   Ns
   iso-8859-1s   This is a string payload(   R	   R   t   set_payloadRA   RF   RK   (   R/   R:   RE   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_payload_with_charsetr   s    	c      
   C   s   |  i  } |  i d  } | i   } | | d  d d d d g  |  i d  } | i d  } | | d d d d d g  |  i d  } | i   } | | d  d d d  d d	 d d g  d  S(
   Ns
   msg_08.txts   us-asciis
   iso-8859-1s
   iso-8859-2s   koi8-rs
   msg_09.txtt   dingbats
   msg_12.txts
   iso-8859-3(   RA   R;   t   get_charsetsRG   (   R/   RC   R:   t   charsets(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_charsetsx   s    	
c         C   s   |  i  } |  i d  } g  } | i   D] } | | i   q) ~ } | | d d g  |  i d  } | i d  } | | i   d  d  S(   Ns
   msg_04.txts   msg.txts
   msg_07.txti   s   dingusfish.gif(   RA   R;   t   get_payloadt   get_filename(   R/   RC   R:   t   _[1]t   pt	   filenamest   subpart(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_filename   s    	-c         C   s\   |  i  } |  i d  } g  } | i   D] } | | i   q) ~ } | | d d g  d  S(   Ns
   msg_44.txts   msg.txt(   RA   R;   RT   RU   (   R/   RC   R:   RV   RW   RX   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_get_filename_with_name_parameter   s    	-c         C   s/   |  i  } |  i d  } | | i   d  d  S(   Ns
   msg_07.txtt   BOUNDARY(   RA   R;   t   get_boundary(   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_boundary   s    	c         C   s   |  i  } |  i d  } | i d  | i   d \ } } | | i   d  | | d  |  i d  } | i d  | i   d \ } } | | i   d  | | d  |  i d  } |  i t i | i d  d  S(	   Ns
   msg_01.txtR\   i   s   content-types3   text/plain; charset="us-ascii"; boundary="BOUNDARY"s
   msg_04.txts$   multipart/mixed; boundary="BOUNDARY"s
   msg_03.txt(   RA   R;   t   set_boundaryt   itemst   lowert   assertRaisesR   t   HeaderParseError(   R/   RC   R:   t   headert   value(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_boundary   s    	c         C   s   |  i  } |  i d  } | | i d t  d   | | i d  i d t  d  | | i d  i d t  d  | | i d  i d t  d  | | i d	  i d t  d
  d  S(   Ns
   msg_10.txtt   decodei    s    This is a 7bit encoded message.
i   s-   This is a Quoted Printable encoded message!
i   s!   This is a Base64 encoded message.i   s/   This has no Content-Transfer-Encoding: header.
(   RA   R;   RT   t   TrueRG   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_decoded_payload   s    	c         C   s}   |  i  } t   } | i d  x1 d
 D]) } | | d <| | i d t  d  q& W| i d	  | | i d t  d	  d  S(   Ns$   begin 666 -
+:&5L;&\@=V]R;&0 
 
end
s
   x-uuencodet   uuencodet   uues   x-uues   content-transfer-encodingRg   s   hello worldt   foo(   s
   x-uuencodeRj   Rk   s   x-uue(   RA   R	   RN   RT   Rh   (   R/   RC   R:   t   cte(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_decoded_uu_payload   s    		 
c         C   s{   |  i  } |  i d  } t d  } z | i   } Wd  | i   Xt   } t |  } | i |  | | i   |  d  S(   Ns
   msg_07.txts
   msg_17.txt(	   RA   R;   R&   t   readR9   R    R   t   flattenR.   (   R/   RC   R:   R5   t   textt   st   g(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_decoded_generator   s    		c         C   s   t    } d | d <d | d <|  i d | j  |  i d | j  |  i d | j  |  i d | j  |  i d | j  |  i d | j  d  S(	   Nt   Met   Fromt   Yout   tot   fromt   FROMt   Tot   TO(   R	   t
   failUnless(   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test__contains__   s    	

c         C   s   |  i  } |  i d  } t d  } z | i   } Wd  | i   X| | | i    t |  } | i d  } |  i | d i	 d   | | t
 i | d   d  S(   Ns
   msg_01.txts   
i    s   From i   (   RA   R;   R&   Ro   R9   t	   as_stringR(   t   splitR}   t
   startswithR,   R    (   R/   RC   R:   R5   Rq   t   fullreprt   lines(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_as_string   s    	c         C   s,   t  i d  } |  i | i d  d  d  S(   Ns   Content-Type: blarg; baz; boo
t   bazR   (   R7   t   message_from_stringRA   RJ   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_bad_param   s    c         C   s)   t  i d  } |  i | i   d   d  S(   Ns
   From: foo
(   R7   R   RA   RU   RG   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_missing_filename   s    c         C   s)   t  i d  } |  i | i   d  d  S(   Ns%   Content-Disposition: blarg; filename
R   (   R7   R   RA   RU   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_bogus_filename  s    	c         C   s)   t  i d  } |  i | i   d   d  S(   Ns
   From: foo
(   R7   R   RA   R]   RG   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_missing_boundary  s    c         C   s   |  i  } t i d  } | | i d d  d d d g  t i d
  } | | i d d  d d d g  | | i   d   t i d  } | | i d d  d d d g  d  S(   Ns&   X-Header: foo=one; bar=two; baz=three
Rd   s   x-headerRl   t   onet   bart   twoR   t   threes    X-Header: foo; bar=one; baz=two
R   s"   X-Header: foo; bar="one"; baz=two
(   s   fooR   (   R   R   (   s   bazR   (   s   fooR   (   R   R   (   s   bazR   (   s   fooR   (   R   R   (   s   bazR   (   RA   R7   R   t
   get_paramsRG   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_params  s    				c         C   s0   t    } d | d <|  i | i d  d  d  S(   Ns>   Content-Type: Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"s   Content-Typet   boundaryt   CPIMSSMTPC06p5f3tG(   R	   RA   RJ   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_param_liberal  s    	
c         C   s   |  i  } t i d  } | | i d d d d  | | i d d d d   | | i d  d   t i d  } | | i d d d d	  | | i d d d d
  | | i d d d d  d  S(   Ns&   X-Header: foo=one; bar=two; baz=three
R   Rd   s   x-headerR   t   quuzs"   X-Header: foo; bar="one"; baz=two
Rl   R   R   R   (   RA   R7   R   RJ   RG   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_param!  s    			c         C   s5   |  i  d  } |  i | i d  i d  d  d  S(   Ns
   msg_22.txti   t   names
   wibble.JPG(   R;   RA   RT   RJ   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt'   test_get_param_funky_continuation_lines2  s    c         C   sK   t  i d  } |  i | i d  d  |  i | i d d t d  d  S(   Ns4   Content-Type: image/pjpeg; name="Jim&amp;&amp;Jill"
R   s   Jim&amp;&amp;Jillt   unquotes   "Jim&amp;&amp;Jill"(   R7   R   RA   RJ   t   False(   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt#   test_get_param_with_semis_in_quotes6  s
    	c         C   sk   t  i d  } |  i | i d   |  i | i d   |  i | i d   |  i | i d   d  S(   Ns   Header: existsRd   R   t   HEADERt   headeri(   R7   R   R}   t   has_keyt   failIf(   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_has_key=  s
    c         C   s   |  i  } t   } | i d d  | | i d  d  | i d d  | | i d  d  | | i d d t d  | | i   d d d g  | | i d t  d d d g  | i d d
 d d | | i d d d d
  d  S(   NRE   s   iso-2022-jpt
   importances
   high valueR   s   "high value"s
   text/plainR   s   "iso-2022-jp"s   iso-9999-xxRd   s   X-Jimmy(   s
   text/plainR   (   s   charsets   iso-2022-jp(   R   s
   high value(   s
   text/plainR   (   s   charsets   "iso-2022-jp"(   R   s   "high value"(   RA   R	   t	   set_paramRJ   R   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_paramD  s    		

c         C   s   |  i  } |  i d  } | | i   d d	 d
 g  | i d  } | i d  | | i   d d g  | i d |  | | i   d d d | f g  d  S(   Ns
   msg_05.txts   multipart/reportR   s   report-types   delivery-statusR   s%   D1690A7AC1.996856090/mail.example.com(   s   multipart/reportR   (   s   report-types   delivery-status(   s   boundarys%   D1690A7AC1.996856090/mail.example.com(   s   multipart/reportR   (   s   boundarys%   D1690A7AC1.996856090/mail.example.com(   s   multipart/reportR   (   s   boundarys%   D1690A7AC1.996856090/mail.example.com(   RA   R;   R   RJ   t	   del_paramR   (   R/   RC   R:   t   old_val(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_del_paramU  s    	

c         C   sG   t    } | i d d d d | i d d  |  i | d d  d  S(   Ns   Content-Dispositiont
   attachmentR$   s   bud.gifs   content-disposition(   R	   t
   add_headerR   RA   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_del_param_on_other_headerf  s    	c         C   s   |  i  } t   } |  i t | i d  | i d  | | d d  | i d d  | | d d  | i d  | | d d  d  S(	   NRq   s
   text/plains   content-typeRE   s   us-asciis   text/plain; charset="us-ascii"s	   text/htmls   text/html; charset="us-ascii"(   RA   R	   Rb   t
   ValueErrort   set_typeR   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_typel  s    		c         C   s;   t    } d | d <| i d d  |  i | d d  d  S(   Ns
   text/plains   X-Content-Types   application/octet-streams   x-content-type(   R	   R   RA   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_set_type_on_other_headerw  s    	
c         C   s#   t    } |  i | i   d  d  S(   Ns
   text/plain(   R	   RA   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_content_type_missing}  s    	c         C   s0   t    } | i d  |  i | i   d  d  S(   Ns   message/rfc822(   R	   t   set_default_typeRA   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_get_content_type_missing_with_default_type  s    	c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_30.txti    s   message/rfc822(   R;   RA   RT   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt+   test_get_content_type_from_message_implicit  s    c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_28.txti    s   message/rfc822(   R;   RA   RT   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt+   test_get_content_type_from_message_explicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_03.txts
   text/plain(   R;   RA   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt6   test_get_content_type_from_message_text_plain_implicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_01.txts
   text/plain(   R;   RA   RI   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt6   test_get_content_type_from_message_text_plain_explicit  s    c         C   s#   t    } |  i | i   d  d  S(   NRq   (   R	   RA   t   get_content_maintype(   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt!   test_get_content_maintype_missing  s    	c         C   s0   t    } | i d  |  i | i   d  d  S(   Ns   message/rfc822t   message(   R	   R   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt3   test_get_content_maintype_missing_with_default_type  s    	c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_30.txti    R   (   R;   RA   RT   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_get_content_maintype_from_message_implicit  s    c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_28.txti    R   (   R;   RA   RT   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_get_content_maintype_from_message_explicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_03.txtRq   (   R;   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt:   test_get_content_maintype_from_message_text_plain_implicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_01.txtRq   (   R;   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt:   test_get_content_maintype_from_message_text_plain_explicit  s    c         C   s#   t    } |  i | i   d  d  S(   Nt   plain(   R	   RA   t   get_content_subtype(   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt    test_get_content_subtype_missing  s    	c         C   s0   t    } | i d  |  i | i   d  d  S(   Ns   message/rfc822t   rfc822(   R	   R   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt2   test_get_content_subtype_missing_with_default_type  s    	c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_30.txti    R   (   R;   RA   RT   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt.   test_get_content_subtype_from_message_implicit  s    c         C   s2   |  i  d  } |  i | i d  i   d  d  S(   Ns
   msg_28.txti    R   (   R;   RA   RT   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt.   test_get_content_subtype_from_message_explicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_03.txtR   (   R;   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt9   test_get_content_subtype_from_message_text_plain_implicit  s    c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_01.txtR   (   R;   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt9   test_get_content_subtype_from_message_text_plain_explicit  s    c         C   s-   t    } d | d <|  i | i   d  d  S(   Ns   no-slash-in-this-strings   Content-TypeRq   (   R	   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_content_maintype_error  s    	
c         C   s-   t    } d | d <|  i | i   d  d  S(   Ns   no-slash-in-this-strings   Content-TypeR   (   R	   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_get_content_subtype_error  s    	
c         C   s=  |  i  } t   } | i d d  | i d d  | i d d  | | i   d d d g  | | i   d d d g  | i d d  | | i   d d d g  | | i   d d d g  | i d d  | i d d	  | | i   d d d d g  | | i   d	 d d d g  |  i t | i d
 d  d  S(   Nt   Firstt   Onet   Secondt   Twot   Thirdt   Threet   Twentyt   Elevens   One Hundredt   Fourtht   Missing(   RA   R	   R   t   keyst   valuest   replace_headerRb   t   KeyError(   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_replace_header  s    		c         C   sP   d } t    } d | d <d | d <| i |  |  i | i d t  |  d  S(   Ns   AwDp0P7//y6LwKEAcPa/6Q=9s   audio/x-midis   content-typet   base64s   content-transfer-encodingRg   (   R	   RN   RA   RT   Rh   (   R/   t   xR:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_broken_base64_payload  s    	

(5   R<   R=   RD   RL   RM   RO   RS   RZ   R[   R^   Rf   Ri   Rn   Rt   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   (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR>   J   sf   																																																		t   TestEncodersc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s4   |  i  } t   } | i d  | | d d  d  S(   Ns   us-asciis   content-transfer-encodingt   7bit(   RA   R	   RH   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_encode_empty_payload  s    		c         C   s*   |  i  } t d  } | | d d  d  S(   Ns   hello worlds   content-transfer-encodingR   (   RA   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_default_cte  s    	c         C   sj   |  i  } t d  } | | d d  t d  } | | d d  t d d d } | | d d  d  S(	   Ns   hello worlds   content-transfer-encodingR   s   hello  worldt   8bitt   _charsets
   iso-8859-1s   quoted-printable(   RA   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s    	(   R<   R=   R   R   (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s   		t   TestLongHeadersc           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   sQ   |  i  } t i d  } t   } t |  } | i |  | | i   d  d  S(   Ns   Subject: bug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more text

test
(   R6   R7   R   R    R   Rp   R.   (   R/   RC   R:   t   sfpRs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_split_long_continuation  s    			c         C   sW   |  i  } d } t | d d } | | i   d  t |  } | | i   d  d  S(   Ns   bug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more textt   continuation_wss   	s   bug demonstration
 12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
 more text(   R6   R   t   encode(   R/   RC   t   hstrt   h(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt,   test_another_long_almost_unsplittable_header   s    	c         C   s   |  i  } t d  } t d  } t d  } d } d } d i d  } t | | d d } | i | |  | i | |  t   }	 | |	 d <t   }
 t |
  } | i |	  | |
 i	   d	  | | i   d
  d  S(   Ns
   iso-8859-1s
   iso-8859-2s   utf-8s   Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an sdlndischen Wandgemlden vorbei, gegen die rotierenden Klingen befrdert. s;   Finanni metropole se hroutily pod tlakem jejich dvtipu.. u   正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.」と言っています。t   header_namet   Subjects  Subject: =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerd?=
 =?iso-8859-1?q?erband_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndi?=
 =?iso-8859-1?q?schen_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Kling?=
 =?iso-8859-1?q?en_bef=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_met?=
 =?iso-8859-2?q?ropole_se_hroutily_pod_tlakem_jejich_d=F9vtipu=2E=2E_?=
 =?utf-8?b?5q2j56K644Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE?=
 =?utf-8?b?44G+44Gb44KT44CC5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB?=
 =?utf-8?b?44GC44Go44Gv44Gn44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CM?=
 =?utf-8?q?Wenn_ist_das_Nunstuck_git_und_Slotermeyer=3F_Ja!_Beiherhund_das?=
 =?utf-8?b?IE9kZXIgZGllIEZsaXBwZXJ3YWxkdCBnZXJzcHV0LuOAjeOBqOiogOOBow==?=
 =?utf-8?b?44Gm44GE44G+44GZ44CC?=

s  =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerd?=
 =?iso-8859-1?q?erband_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndi?=
 =?iso-8859-1?q?schen_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Kling?=
 =?iso-8859-1?q?en_bef=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_met?=
 =?iso-8859-2?q?ropole_se_hroutily_pod_tlakem_jejich_d=F9vtipu=2E=2E_?=
 =?utf-8?b?5q2j56K644Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE?=
 =?utf-8?b?44G+44Gb44KT44CC5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB?=
 =?utf-8?b?44GC44Go44Gv44Gn44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CM?=
 =?utf-8?q?Wenn_ist_das_Nunstuck_git_und_Slotermeyer=3F_Ja!_Beiherhund_das?=
 =?utf-8?b?IE9kZXIgZGllIEZsaXBwZXJ3YWxkdCBnZXJzcHV0LuOAjeOBqOiogOOBow==?=
 =?utf-8?b?44Gm44GE44G+44GZ44CC?=(
   R6   R   R   R   t   appendR	   R    R   Rp   R.   (   R/   RC   Rs   t   czt   utf8t   g_headt   cz_headt	   utf8_headR   R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_nonstring1  s&    		
	c         C   s2   |  i  } t d d d } | | i   d  d  S(   Nsi   wasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"R   s   X-Foobar-Spoink-Defrobnitsj   wasnipoop; giraffes="very-long-necked-animals";
 spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"(   R6   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_header_encode\  s
    			c         C   s8   |  i  } t d d d d d } | | i   d  d  S(   Nsi   wasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"R   s   X-Foobar-Spoink-DefrobnitR   s   	sj   wasnipoop; giraffes="very-long-necked-animals";
	spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"(   R6   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt-   test_long_header_encode_with_tab_continuatione  s    			c         C   sX   |  i  } t d  } d | d <t   } t |  } | i |  | | i   d  d  S(   NR   si   wasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"s   X-Foobar-Spoink-Defrobnits   Content-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"

(   R6   R   R    R   Rp   R.   (   R/   RC   R:   R   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_splittero  s    	
	c         C   s   |  i  } t   } d | d <t i g  } t d  D] } | d | q3 ~  | d <| i d  t   } t |  } | i |  | | i	   d  d  S(   Ns   test@dom.ainRv   i
   s   <%d@dom.ain>t
   Referencest   Tests   From: 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>

Test(
   R6   R	   t   SPACER    t   rangeRN   R    R   Rp   R.   (   R/   RC   R:   RV   t   iR   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_no_semis_header_splitter  s    		
8	c         C   s@   |  i  } d d d } t | d d } | | i   d  d  S(   Ns   References: R   iP   R   s   	s\   References: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(   R6   R   R   (   R/   RC   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_no_split_long_header  s
    	c         C   s8   |  i  } d } t | d d } | | i   d  d  S(   NsW  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   s   	s_  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)(   R6   R   R   (   R/   RC   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt"   test_splitting_multiple_long_lines  s
    	c         C   sD   |  i  } d } t | d d d d d d } | | i   d  d  S(	   Ns   from 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 -0400t
   maxlineleniN   R   t   ReceivedR   s   	s   from 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(   R6   R   R   (   R/   RC   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt&   test_splitting_first_line_only_is_long  s    		c         C   sU   |  i  } t   } t d d d d } | i d  | | d <| | i   d  d  S(   Ns   Britische Regierung gibts
   iso-8859-1R   R   s+   grnes Licht fr Offshore-Windkraftprojektes   Subject: =?iso-8859-1?q?Britische_Regierung_gibt?= =?iso-8859-1?q?gr=FCnes?=
 =?iso-8859-1?q?_Licht_f=FCr_Offshore-Windkraftprojekte?=

(   R6   R	   R   R   R   (   R/   RC   R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_8bit_header  s    			
c         C   s3   |  i  } t   } d | d <| | i   d  d  S(   Nsf   Britische Regierung gibt grnes Licht fr Offshore-Windkraftprojekte <a-very-long-address@example.com>s   Reply-Tosr   Reply-To: Britische Regierung gibt grnes Licht fr Offshore-Windkraftprojekte <a-very-long-address@example.com>

(   R6   R	   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt    test_long_8bit_header_no_charset  s
    		
c         C   s<   |  i  } d } t   } | | d <| | i d  d  d  S(   Ns   "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{   i    s   To: "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>

(   R6   R	   R   (   R/   RC   Rx   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_to_header  s    		
c         C   s?   |  i  } d } t |  } | i d  | | i   d  d  S(   NsI   This is an example of string which has almost the limit of header length.s   Add another line.s\   This is an example of string which has almost the limit of header length.
 Add another line.(   R6   R   R   R   (   R/   RC   Rr   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_line_after_append  s    	c         C   s?   |  i  } d } t |  } | i d  | | i   d  d  S(   Ns   This is a shorter line.s!   Add another sentence. (Surprise?)s9   This is a shorter line. Add another sentence. (Surprise?)(   R6   R   R   R   (   R/   RC   Rr   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_shorter_line_with_append  s    	c         C   sA   |  i  } d } d } t | d d | } | | i   d  d  S(   Ns!   X-Very-Very-Very-Long-Header-Names   Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an sdlndischen Wandgemlden vorbei, gegen die rotierenden Klingen befrdert. s
   iso-8859-1R   s  =?iso-8859-1?q?Die_Mieter_treten_hier_?=
 =?iso-8859-1?q?ein_werden_mit_einem_Foerderband_komfortabel_den_Korridor_?=
 =?iso-8859-1?q?entlang=2C_an_s=FCdl=FCndischen_Wandgem=E4lden_vorbei=2C_g?=
 =?iso-8859-1?q?egen_die_rotierenden_Klingen_bef=F6rdert=2E_?=(   R6   R   R   (   R/   RC   t   fnt   gsR   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_field_name  s    	c         C   sI   d } t    } t | d d | d <| | d <|  i | i   d  d  S(   Ns   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 -0700R   s   	s
   Received-1s
   Received-2s1  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

(   R	   R   RA   R   (   R/   R   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_received_header   s    	
c         C   sO   d } t    } t | d d d d | d <| | d <|  i | i   d  d  S(   Ns   <15975.17901.207240.414604@sgigritzmann1.mathematik.tu-muenchen.de> (David Bremner's message of "Thu, 6 Mar 2003 13:58:21 +0100")R   s
   Received-1R   s   	s
   Received-2s  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")

(   R	   R   RA   R   (   R/   R   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_string_headerinst_eq  s    	
c         C   sO   |  i  } t   } d } | | d <t | d d | d <| | i   d  d  S(   Ns    iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzps   Face-1R   s   Face-2s7  Face-1: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
	locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp
Face-2: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp

(   R6   R	   R   R   (   R/   RC   R:   t   t(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt-   test_long_unbreakable_lines_with_continuation  s    		
c         C   s5   |  i  } d } t i |  } | | i   d  d  S(   Ns   Received: 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 -0700s   Received: 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

(   R6   R7   R   R   (   R/   RC   t   mR:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt"   test_another_long_multiline_header-  s
    	c         C   sO   |  i  } d } t   } | | d <t | d d | d <| | i   d  d  S(   Ns   List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>t   ListR   sQ  List: List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
	<mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>
List: List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
 <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>

(   R6   R	   R   R   (   R/   RC   R   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_long_lines_with_different_header9  s    		
(   R<   R=   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R  R  R  R  R	  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s*   			+			
																	t   TestFromManglingc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s-   t    |  _ d |  i d <|  i i d  d  S(   Ns   aaa@bbb.orgRv   s(   From the desk of A.A.A.:
Blah blah blah
(   R	   R:   RN   (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   setUpM  s    	c         C   sE   t    } t | d t } | i |  i  |  i | i   d  d  S(   Nt   mangle_from_s<   From: aaa@bbb.org

>From the desk of A.A.A.:
Blah blah blah
(   R    R   Rh   Rp   R:   RA   R.   (   R/   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_mangled_fromU  s
    	c         C   sE   t    } t | d t } | i |  i  |  i | i   d  d  S(   NR  s;   From: aaa@bbb.org

From the desk of A.A.A.:
Blah blah blah
(   R    R   R   Rp   R:   RA   R.   (   R/   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_dont_mangle_from`  s
    	(   R<   R=   R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  L  s   		t   TestMIMEAudioc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   ss   t  i i t  i i t  d d  } t t d |  d  } z | i   |  _ Wd  | i	   Xt
 |  i  |  _ d  S(   NR   R   s   audiotest.aut   rb(   R   R   R    R!   R"   R#   R   Ro   t
   _audiodataR9   R   t   _au(   R/   t   datadirR5   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  o  s    $c         C   s   |  i  |  i i   d  d  S(   Ns   audio/basic(   RA   R  RI   (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_guess_minor_type}  s    c         C   s/   |  i  i   } |  i t i |  |  i  d  S(   N(   R  RT   RA   R   t   decodestringR  (   R/   t   payload(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_encoding  s    c         C   s,   t  |  i d  } |  i | i   d  d  S(   Nt   fishs
   audio/fish(   R   R  RA   RI   (   R/   t   au(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_checkSetMinor  s    c         C   s  |  i  } |  i } |  i i d d d d | |  i d d  | |  i i d d  d d g  | |  i i d d d d  g  } | |  i i d d d d  | |  i i d	 d
 | d d | j  | |  i i d |  | j  | |  i i d | d d | j  d  S(   Ns   Content-DispositionR   R$   s   audiotest.aus   content-dispositions#   attachment; filename="audiotest.au"Rd   R   Rl   t   failobjt   foobar(   s
   attachmentR   (   R$   s   audiotest.au(   RA   R}   R  R   R   RJ   (   R/   RC   t   unlesst   missing(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_add_header  s"    		(   R<   R=   R  R  R  R  R#  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  n  s
   				t   TestMIMEImagec           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   sC   t  d  } z | i   |  _ Wd  | i   Xt |  i  |  _ d  S(   Ns   PyBanner048.gif(   R&   Ro   t   _imgdataR9   R   t   _im(   R/   R5   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s
    c         C   s   |  i  |  i i   d  d  S(   Ns	   image/gif(   RA   R&  RI   (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s/   |  i  i   } |  i t i |  |  i  d  S(   N(   R&  RT   RA   R   R  R%  (   R/   R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s,   t  |  i d  } |  i | i   d  d  S(   NR  s
   image/fish(   R   R%  RA   RI   (   R/   t   im(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s  |  i  } |  i } |  i i d d d d | |  i d d  | |  i i d d  d d g  | |  i i d d d d  g  } | |  i i d d d d  | |  i i d	 d
 | d d | j  | |  i i d |  | j  | |  i i d | d d | j  d  S(   Ns   Content-DispositionR   R$   s   dingusfish.gifs   content-dispositions%   attachment; filename="dingusfish.gif"Rd   R   Rl   R  R   (   s
   attachmentR   (   R$   s   dingusfish.gif(   RA   R}   R&  R   R   RJ   (   R/   RC   R!  R"  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR#    s"    		(   R<   R=   R  R  R  R  R#  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR$    s
   				t   TestMIMEApplicationc           B   s   e  Z d    Z d   Z RS(   c         C   s=   |  i  } t d  } | | i   d  | | d d  d  S(   Ns   s   application/octet-streams   content-transfer-encodingR   (   RA   R
   RI   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_headers  s    	c         C   sK   |  i  } d } t |  } | | i   d  | | i d t  |  d  S(   Ns   s   +vv8/f7/Rg   (   RA   R
   RT   Rh   (   R/   RC   t   bytesR:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt	   test_body  s
    	(   R<   R=   R)  R+  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR(    s   	t   TestMIMETextc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s   t  d  |  _ d  S(   Ns   hello there(   R   t   _msg(   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s   |  i  } |  i } | |  i i   d  | |  i i d  d  g  } | |  i i d |  | j  | |  i i d | d d | j  d  S(   Ns
   text/plainRE   s   us-asciiR   Rd   (   RA   R}   R-  RI   RJ   (   R/   RC   R!  R"  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt
   test_types  s    		c         C   s4   |  i  |  i i   d  |  i |  i i    d  S(   Ns   hello there(   RA   R-  RT   R}   t   is_multipart(   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_payload  s    c         C   sF   |  i  } t d d d } | | i   i d  | | d d  d  S(   Ns   hello thereR   s   us-asciis   content-types   text/plain; charset="us-ascii"(   RA   R   RF   RK   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_charset  s    	(   R<   R=   R  R.  R0  R1  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR,    s   		
	t   TestMultipartc           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   sZ  t  d  } z | i   } Wd  | i   Xt d d d d } t | d d } | i d d	 d
 d t d  } | i |  | i |  d | d <d | d <d | d <d } t i	 |  } | d d j o t i
 } n
 t i } | d j o
 d }	 n d }	 d |	 | d f }
 t i d t i	 |   |
 | d <| |  _ | |  _ | |  _ d  S(   Ns   PyBanner048.gift	   multipartt   mixedR   R\   R   s   dingusfish.gifs   content-dispositionR   R$   s$   Hi there,

This is the dingus fish.
s   Barry <barry@digicool.com>Rv   s)   Dingus Lovers <cravindogs@cravindogs.com>R{   s   Here is your dingus fishR   g4FcpAii    t   -t   +s    %s%04di$   s   %a, %d %b %Y %H:%M:%St   Date(   R&   Ro   R9   R   R   R   R   t   attacht   timet	   localtimet   timezonet   altzonet   strftimeR-  R&  t   _txt(   R/   R5   R   t	   containert   imaget   introt   nowt	   timetuplet   tzsecst   signt   tzoffset(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s<    	


	
		c         C   s   |  i  } |  i } |  i } |  i } | | i    | | i   d  | t | i    d  | t | i d  | i d  } | i d  } | | |  i	 j  | | |  i
 j  | | i   | | g  | | i    | | i    d  S(   Ns   multipart/mixedi   i    i   (   RA   R}   Rb   R-  R/  RI   t   lenRT   t
   IndexErrorR>  R&  (   R/   RC   R!  t   raisesR
  t   m0t   m1(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_hierarchy  s    				c         C   s2   d } t    i |  } |  i | | i    d  S(   Ns   Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY


--BOUNDARY--
(   R   t   parsestrR6   R   (   R/   Rq   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_empty_multipart_idempotent2  s    c         C   sT   t  d d  } d | d <d | d <d | d <| i d	  |  i | i   d
  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   R\   s   Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain

--BOUNDARY

--BOUNDARY--(   R   R_   R6   R   (   R/   t   outer(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_no_parts_in_a_multipart_with_none_epilogueC  s    


	c         C   sf   t  d d  } d | d <d | d <d | d <d	 | _ d	 | _ | i d
  |  i | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   R   R\   s   Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY

--BOUNDARY--
(   R   t   preamblet   epilogueR_   R6   R   (   R/   RO  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt0   test_no_parts_in_a_multipart_with_empty_epilogueT  s    


		c         C   ss   |  i  } t d d  } d | d <d | d <d | d <| i d	  t d
  } | i |  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   R\   s   hello worlds  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--(   R6   R   R_   R   R8  R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_one_part_in_a_multiparti  s    	


c         C   s|   |  i  } t d d  } d | d <d | d <d | d <d	 | _ t d
  } | i |  | i d  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   R   s   hello worldR\   s  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--(   R6   R   RQ  R   R8  R_   R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt1   test_seq_parts_in_a_multipart_with_empty_preamble  s    	


	c         C   s|   |  i  } t d d  } d | d <d | d <d | d <d  | _ t d	  } | i |  | i d
  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   s   hello worldR\   s  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--(   R6   R   RG   RQ  R   R8  R_   R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt0   test_seq_parts_in_a_multipart_with_none_preamble  s    	


	c         C   s|   |  i  } t d d  } d | d <d | d <d | d <d  | _ t d	  } | i |  | i d
  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   s   hello worldR\   s  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--(   R6   R   RG   RR  R   R8  R_   R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt0   test_seq_parts_in_a_multipart_with_none_epilogue  s    	


	c         C   s|   |  i  } t d d  } d | d <d | d <d | d <d	 | _ t d
  } | i |  | i d  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   R   s   hello worldR\   s  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--
(   R6   R   RR  R   R8  R_   R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt1   test_seq_parts_in_a_multipart_with_empty_epilogue  s    	


	c         C   s|   |  i  } t d d  } d | d <d | d <d | d <d	 | _ t d
  } | i |  | i d  | | i   d  d  S(   NR3  R4  s	   A subjectR   s   aperson@dom.ainR{   s   bperson@dom.ainRv   s   
s   hello worldR\   s  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--

(   R6   R   RR  R   R8  R_   R   (   R/   RC   RO  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt.   test_seq_parts_in_a_multipart_with_nl_epilogue  s    	


	c         C   s   |  i  } |  i d  } | t | i    d  | i d  } | | i   d  | t | i    d  xb | i   D]T } | | i   d  | t | i    d  | i d  } | | i   d  qy Wd  S(   Ns
   msg_36.txti   i   s   multipart/alternatives   message/external-bodyi    s
   text/plain(   RA   R;   RG  RT   RI   (   R/   RC   R:   t   msg1RY   t
   subsubpart(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_message_external_body  s    	 c         C   s/   |  i  d  } |  i t | i    d  d  S(   Ns
   msg_37.txti   (   R;   RA   RG  RT   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_double_boundary  s    c         C   sH   |  i  } |  i d  } t   } t i | |  | | i   d  d  S(   Ns
   msg_38.txts   multipart/mixed
    multipart/mixed
        multipart/alternative
            text/plain
        text/plain
    text/plain
    text/plain
(   R6   R;   R    R   t
   _structureR.   (   R/   RC   R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt)   test_nested_inner_contains_outer_boundary  s    		c         C   sH   |  i  } |  i d  } t   } t i | |  | | i   d  d  S(   Ns
   msg_39.txts   multipart/mixed
    multipart/mixed
        multipart/alternative
        application/octet-stream
        application/octet-stream
    text/plain
(   R6   R;   R    R   R^  R.   (   R/   RC   R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_nested_with_same_boundary-  s    		c         C   s)   |  i  d  } |  i | i   d  d  S(   Ns
   msg_40.txts   MIME-Version: 1.0
Content-Type: text/html; boundary="--961284236552522269"

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

<html></html>

----961284236552522269--
(   R;   RA   R   (   R/   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_boundary_in_non_multipart>  s    c         C   s[   |  i  } t i d  } |  i | i    | | i   d  | t | i    d  d  S(   Ns   MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="    XXXX"

--    XXXX
Content-Type: text/plain


--    XXXX
Content-Type: text/plain

--    XXXX--
s       XXXXi   (   RA   R7   R   R}   R/  R]   RG  RT   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt    test_boundary_with_leading_spaceM  s    		c         C   s5   t    i d  } |  i | i d  i   d  d  S(   Ns   Content-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==--i    s   YXNkZg==(   R   RM  t   assertEqualsRT   (   R/   R
  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt&   test_boundary_without_trailing_newline`  s    	
	(   R<   R=   R  RL  RN  RP  RS  RT  RU  RV  RW  RX  RY  R\  R]  R_  R`  Ra  Rb  Rd  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR2    s$   	(																t   TestNonConformantc           B   sY   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         C   sU   |  i  } |  i d  } | | i   d  | | i   d  | | i   d  d  S(   Ns
   msg_14.txts
   text/plainRq   R   (   RA   R;   RI   R   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parse_missing_minor_typer  s
    	c         C   st   |  i  } |  i d  } | i d  } | t | d   |  i t | i  d  | t | i d t i	   d  S(   Ns
   msg_15.txti    t   defectsi   (
   R}   R;   RT   t   hasattrRA   RG  Rg  t
   isinstanceR   t   StartBoundaryNotFoundDefect(   R/   R!  R:   t   inner(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_same_boundary_inner_outery  s    	c         C   s   |  i  } |  i d  } | t | i   t   |  i t | i  d  | t | i d t i	   | t | i d t i
   d  S(   Ns
   msg_25.txti   i    i   (   R}   R;   Ri  RT   R(   RA   RG  Rg  R   t   NoBoundaryInMultipartDefectt!   MultipartInvariantViolationDefect(   R/   R!  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multipart_no_boundary  s    	c         C   s   |  i  } |  i } t   } d | d <| | i   d  | | i   d  | | i   d  | d =d | d <| | i   d  | | i   d  | | i   d  t   } t |  } | i |  | | i	   d  d  S(   NRq   s   Content-TypeR   s
   text/plains   content-typeRl   s   Content-Type: foo

(
   RA   R6   R	   R   R   RI   R    R   Rp   R.   (   R/   RC   t   neqR:   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_invalid_content_type  s     			

	c         C   s/   |  i  } |  i d  } | | i   d  d  S(   Ns
   msg_31.txtsm   --BOUNDARY
Content-Type: text/plain

message 1

--BOUNDARY
Content-Type: text/plain

message 2

--BOUNDARY--
(   R6   R;   RT   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_no_start_boundary  s    	c         C   s/   |  i  } |  i d  } | | i   d  d  S(   Ns
   msg_35.txts   From: aperson@dom.ain
To: bperson@dom.ain
Subject: here's something interesting

counter to RFC 2822, there's no separating newline here
(   R6   R;   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_no_separating_blank_line  s    	c         C   s   |  i  } |  i d  } | t | d   |  i t | i  d  | t | i d t i   | t | i d t i	   d  S(   Ns
   msg_41.txtRg  i   i    i   (
   R}   R;   Rh  RA   RG  Rg  Ri  R   Rm  Rn  (   R/   R!  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_lying_multipart  s    	c         C   sd   |  i  d  } | i d  i d  } |  i t | i  d  |  i t | i d t i   d  S(   Ns
   msg_42.txti   i    (	   R;   RT   RA   RG  Rg  R}   Ri  R   Rj  (   R/   RO  t   bad(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_missing_start_boundary  s
    	c         C   s   |  i  } d } t i |  } | | i   g   | | i   d  | t | i  d  |  i t | i d t	 i
   | | i d i d  d  S(   Ns    Line 1
Line 2
Line 3s   Line 2
Line 3i   i    s    Line 1
(   RA   R7   R   R   RT   RG  Rg  R}   Ri  R   t#   FirstHeaderLineIsContinuationDefectt   line(   R/   RC   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt&   test_first_line_is_continuation_header  s    	(   R<   R=   Rf  Rl  Ro  Rq  Rr  Rs  Rt  Rv  Ry  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRe  q  s   		
								t   TestRFC2047c           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         C   sQ   |  i  } d } t |  } | | d d d	 d
 g  | t t |   d  d  S(   NsV   Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz
 foo bar =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=s   Re:s
   rksmrgss   mac-icelands   baz foo barsV   Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar
 =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=(   s   Re:N(   s
   rksmrgss   mac-iceland(   s   baz foo barN(   s
   rksmrgss   mac-iceland(   RA   R   RG   R(   R   (   R/   RC   Rr   t   dh(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2047_multiline  s    	
c         C   sZ   |  i  } d } t |  } | | d d g  t t |   i d  } | | d  d  S(	   Ns0   =?ISO-8859-1?Q?Andr=E9?= Pirard <pirard@dom.ain>s   Andrs
   iso-8859-1s   Pirard <pirard@dom.ain>s   latin-1s   Andr Pirard <pirard@dom.ain>(   s   Andrs
   iso-8859-1(   s   Pirard <pirard@dom.ain>N(   RA   R   RG   t   unicodeR   R   (   R/   RC   Rr   R{  t   hu(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_whitespace_eater_unicode  s    	c         C   sW   |  i  } d } t |  } | | d d	 d
 d g  t |  i   } | | d  d  S(   NsW   The =?iso-8859-1?b?cXVpY2sgYnJvd24gZm94?= jumped over the =?iso-8859-1?b?bGF6eSBkb2c=?=t   Thes   quick brown foxs
   iso-8859-1s   jumped over thes   lazy dogu,   The quick brown fox jumped over the lazy dog(   R  N(   s   quick brown foxs
   iso-8859-1(   s   jumped over theN(   s   lazy dogs
   iso-8859-1(   RA   R   RG   R   t   __unicode__(   R/   RC   Rr   R{  R~  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_whitespace_eater_unicode_2  s    	c         C   s/   d } t  |  } |  i | | d  f g  d  S(   Ns3   Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord(   R   RA   RG   (   R/   Rr   R{  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2047_missing_whitespace  s    c         C   s5   d } t  |  } |  i | d d	 d
 d d g  d  S(   Ns7   Sm =?ISO-8859-1?B?9g==?= rg =?ISO-8859-1?B?5Q==?= sbordt   Sms   s
   iso-8859-1t   rgs   t   sbord(   R  N(   s   s
   iso-8859-1(   R  N(   s   s
   iso-8859-1(   R  N(   R   RA   RG   (   R/   Rr   R{  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2047_with_whitespace  s
    (   R<   R=   R|  R  R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRz    s
   					t   TestMIMEMessagec           B   s}   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z RS(   c         C   s1   t  d  } z | i   |  _ Wd  | i   Xd  S(   Ns
   msg_11.txt(   R&   Ro   t   _textR9   (   R/   R5   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s   |  i  t t d  d  S(   Ns   a plain string(   Rb   t	   TypeErrorR   (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_type_error  s    c         C   s   |  i  } |  i } d } t   } | | d <t |  } | | i   d  | i   } | t | t   | t |  d  | d } | | | j  | | d |  d  S(   Ns   A sub-messageR   s   message/rfc822i   i    t   subject(	   RA   R}   R	   R   RI   RT   Ri  t   listRG  (   R/   RC   R!  R  R
  R   R  RY   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_valid_argument  s    			

c         C   sX   |  i  } t   } d | d <t   } d | d <t |  } |  i t i | i |  d  S(   Ns	   subpart 1R   s	   subpart 2(   RA   R	   R   Rb   R   t   MultipartConversionErrorR8  (   R/   RC   RZ  t   msg2R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_bad_multipart,  s    		
	
c         C   sr   t    } d | d <| i d  t |  } d | d <t   } t |  } | i |  |  i | i   d  d  S(   Ns   An enclosed messageR   s!   Here is the body of the message.
s   The enclosing messages   Content-Type: message/rfc822
MIME-Version: 1.0
Subject: The enclosing message

Subject: An enclosed message

Here is the body of the message.
(   R	   RN   R   R    R   Rp   RA   R.   (   R/   R
  R   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_generate5  s    	

	c         C   s   |  i  } |  i } |  i d  } | | i   d  | i   } | t | t   | t |  d  | d } |  i t | t   | | d d  | | i   d  d  S(   Ns
   msg_11.txts   message/rfc822i   i    R  s   An enclosed messages!   Here is the body of the message.
(	   RA   R}   R;   RI   RT   Ri  R  RG  R	   (   R/   RC   R!  R:   R  t   submsg(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parse_message_rfc822I  s    		
c   	      C   s?  |  i  } |  i } |  i d  } | | i   d  | | i    | t | i    d  | i d  } | | i   d  | | i   d  | i d  } | | i   d  | t | i    d	  | i d  } | t | t   | | d
 d  | | i	 d d d d  | | i	 d d d d   | i d  } | t | t   | | d d  | | i d d  d d g  | | i	 d d d d  | i d	  } | | i   d  | i   } | t | t   | t |  d  | d } | t | t   | | i   d  | | d d  d  S(   Ns
   msg_16.txts   multipart/reporti   i    s
   text/plains  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

i   s   message/delivery-statusi   s   original-envelope-ids"   0GK500B4HD0888@cougar.noc.ucla.edut   dnsRd   s   reporting-mtaR   t   nsdt   actiont   faileds   original-recipientR   s   jangel1@cougar.noc.ucla.edus   final-recipients   message/rfc822s
   message-ids(   <002001c144a6$8752e060$56104586@oxy.edu>(   s   rfc822R   (   s   jangel1@cougar.noc.ucla.eduR   (   RA   R}   R;   RI   R/  RG  RT   Ri  R	   RJ   RG   R   R  (	   R/   RC   R!  R:   RY   t   dsn1t   dsn2R  R[  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_dsnV  sD    		

c   	      C   s   |  i  } t d  } z | i   } Wd  | i   Xt   } d | d <d | d <d | d <d | _ d	 | _ t d
  } t d  } | i d d d d | i	 |  | i	 |  t
   } t |  } | i |  | | i   |  d  S(   Ns
   msg_21.txts   aperson@dom.ainRv   s   bperson@dom.ainR{   R   R   s   MIME messages   End of MIME message
R   R   s   Content-Types   multipart/mixedR   R\   (   R6   R&   Ro   R9   R	   RQ  RR  R   R   R8  R    R   Rp   R.   (	   R/   RC   R5   Rq   R:   RZ  R  R   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_epilogue  s(    		


			c         C   s   |  i  } t   } d | d <d | d <d | d <d | _ d | _ t d	  } t d
  } | i d d d d | i |  | i |  | | i   d  d  S(   Ns   aperson@dom.ainRv   s   bperson@dom.ainR{   R   R   s   MIME messageR   R   R   s   Content-Types   multipart/mixedR   R\   sd  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--
(   R6   R	   RQ  RR  R   R   R8  R   (   R/   RC   R:   RZ  R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_no_nl_preamble  s    		


		c         C   s  |  i  } t d  } z t i |  } Wd  | i   X| i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  d  S(   Ns
   msg_30.txti    s   message/rfc822i   s
   text/plain(   RA   R&   R7   R8   R9   RT   t   get_default_typeRI   (   R/   RC   R5   R:   t
   container1t
   container2t   container1at   container2a(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_default_type  s"    	c         C   s  |  i  } t d  } z t i |  } Wd  | i   X| i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  | i d  } | | i   d  | | i   d  d  S(   Ns
   msg_28.txti    s   message/rfc822i   s
   text/plain(   RA   R&   R7   R8   R9   RT   R  RI   (   R/   RC   R5   R:   R  R  R  R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt.   test_default_type_with_explicit_container_type  s"    	c         C   sX  |  i  } |  i } t d d  } d | _ t d  } t d  } t |  } t |  } | i |  | i |  | | i   d  | | i   d  | | i   d  | | i   d  | | i	 d  d  | d	 =| d
 =| d	 =| d
 =| | i   d  | | i   d  | | i   d  | | i   d  | | i	 d  d  d  S(   Nt   digestR\   R   s
   message 1
s
   message 2
s   message/rfc822i    s  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--
s   content-types   mime-versionsB  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--
(
   RA   R6   R   RR  R   R   R8  RI   R  R   (   R/   RC   Rp  R?  t	   subpart1at	   subpart2at   subpart1t   subpart2(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_default_type_non_parsed  s4    			c         C   s   |  i  } t d  } t d  } t d | | f  } | t | i    d  | | i d  |  | | i d  |  d  S(   NR   t	   _subpartsi   i    i   (   RA   R   R   RG  RT   (   R/   RC   t   text1t   text2R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt$   test_mime_attachments_in_constructor<  s    	(   R<   R=   R  R  R  R  R  R  R  R  R  R  R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s   								:		#			Jt   TestIdempotentc           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   sC   t  |  } z | i   } Wd  | i   Xt i |  } | | f S(   N(   R&   Ro   R9   R7   R   (   R/   R$   R5   R   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR;   M  s    c         C   sH   |  i  } t   } t | d d } | i |  | | | i    d  S(   Nt   maxheaderleni    (   R6   R    R   Rp   R.   (   R/   R:   Rq   RC   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   _idempotentV  s
    		c         C   s   |  i  } |  i d  \ } } | | i   d  | | i   d  | | i   d  | | i   d d  | | i d  d  | | i d   | | i	 d   |  i
 | |  d  S(	   Ns
   msg_01.txts
   text/plainRq   R   i   RE   s   us-ascii(   s   charsets   us-ascii(   Rc  R;   RI   R   R   R   RJ   RQ  RG   RR  R  (   R/   RC   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parse_text_message]  s    	c         C   sn   |  i  } |  i d  \ } } | | i   d  | | i   d   | | i d  d   |  i | |  d  S(   Ns
   msg_03.txts
   text/plainRE   (   Rc  R;   RI   R   RG   RJ   R  (   R/   RC   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parse_untyped_messagei  s    	c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_04.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_simple_multipartq  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_02.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_MIME_digestu  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_27.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_long_headery  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_28.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt"   test_MIME_digest_with_part_headers}  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_06.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_mixed_with_image  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_05.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multipart_report  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_16.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_21.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_preamble_epilogue  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_23.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multipart_one_part  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_24.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multipart_no_parts  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_31.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRr    s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_32.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_charset  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_33.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_more_rfc2231_parameters  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_34.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_text_plain_in_a_multipart_digest  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns   msg_12a.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_nested_multipart_mixeds  s    c         C   s)   |  i  d  \ } } |  i | |  d  S(   Ns
   msg_36.txt(   R;   R  (   R/   R:   Rq   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_message_external_body_idempotent  s    c         C   s  |  i  } |  i } |  i d  \ } } | | i   d  h  } x$ | i   D] \ } } | | | <qM W| | d d  | | d d  | | i d  | | i d  | t | i    d	  | i d
  } | | i   d  | | i   d  | i d  }	 | |	 i   d  | |	 i   d  | i d  }
 | |
 i   d  |  i t	 |
 t
   |
 i   } | t	 | t   | t |  d  | d
 } | t	 | t
   | | i   d  d  S(   Ns
   msg_05.txts   multipart/reports   report-types   delivery-statusR   s%   D1690A7AC1.996856090/mail.example.coms%   This is a MIME-encapsulated message.
s   
i   i    s
   text/plains   Yadda yadda yadda
i   i   s   message/rfc822(   Rc  R}   R;   RI   R   RQ  RR  RG  RT   Ri  R	   R  (   R/   RC   R!  R:   Rq   t   paramst   pkt   pvRZ  R  t   msg3R  t   msg4(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_content_type  s8    		 
c         C   s   |  i  } |  i } |  i d  \ } } | | i   d  | i   } | t | t   | t |  d  | d } |  i t | t   | | i   d  |  i t | i   t	   | | i   d  d  S(   Ns
   msg_06.txts   message/rfc822i   i    s
   text/plains   
(
   Rc  R}   R;   RI   RT   Ri  R  RG  R	   R(   (   R/   RC   R!  R:   Rq   R  RZ  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parser  s    		
(   R<   R=   R;   R  R  R  R  R  R  R  R  R  R  R  R  R  Rr  R  R  R  R  R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  L  s,   																						 t   TestMiscellaneousc           B   s  e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   s{   t  d  } z | i   } Wd  | i   Xt i |  } t   } t | d d } | i |  |  i | | i	    d  S(   Ns
   msg_01.txtR  i    (
   R&   Ro   R9   R7   R   R    R   Rp   RA   R.   (   R/   R5   Rq   R:   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_message_from_string  s    	c         C   s   t  d  } zj | i   } | i d  t i |  } t   } t | d d } | i |  |  i | | i	    Wd  | i
   Xd  S(   Ns
   msg_01.txti    R  (   R&   Ro   t   seekR7   R8   R    R   Rp   RA   R.   R9   (   R/   R5   Rq   R:   Rr   Rs   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_message_from_file  s    	c         C   s   |  i  } t d  } z | i   } Wd  | i   Xd t f d     Y} t i | |  } | t | |   t d  } z | i   } Wd  | i   Xt i | |  } x' | i   D] } | t | |   q Wd  S(   Ns
   msg_01.txtt	   MyMessagec           B   s   e  Z RS(    (   R<   R=   (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s   s
   msg_02.txt(	   R}   R&   Ro   R9   R	   R7   R   Ri  t   walk(   R/   R!  R5   Rq   R  R:   RY   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt#   test_message_from_string_with_class  s     	 c         C   s   |  i  } d t f d     Y} t d  } z t i | |  } Wd  | i   X| t | |   t d  } z t i | |  } Wd  | i   Xx' | i   D] } | t | |   q Wd  S(   NR  c           B   s   e  Z RS(    (   R<   R=   (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s   s
   msg_01.txts
   msg_02.txt(   R}   R	   R&   R7   R8   R9   Ri  R  (   R/   R!  R  R5   R:   RY   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt!   test_message_from_file_with_class  s    	 c      #   C   s   t  d  } | i } | i   |  i | d d d d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! g   d  S("   NR7   R   t   Encoderst   ErrorsR   R   t	   IteratorsR   R   R   R   R   t   MIMENonMultipartR   R	   R   t   Utilst
   base64MIMER   RE   R   R   t	   generatorRd   R   R   R8   R   t   mimet   parsert
   quopriMIMER   R   (   t
   __import__t   __all__t   sortRA   (   R/   t   modulet   all(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test__all__/  s    

					c         C   sC   t  i    } |  i t i t i |   d  t  i |  d   d  S(   Ni   (   R9  RA   R   t	   parsedatet
   formatdatet   gmtime(   R/   RB  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_formatdateB  s    c         C   sI   t  i    } |  i t i t i | d t  d  t  i |  d   d  S(   NR:  i   (   R9  RA   R   R  R  Rh   R:  (   R/   RB  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_formatdate_localtimeG  s    c         C   s~   t  i    } |  i t i | d t t  i d t  i |    |  i t i | d t d t t  i d t  i |    d  S(   NR:  s   %a, %d %b %Y %H:%M:%S -0000t   usegmts   %a, %d %b %Y %H:%M:%S GMT(   R9  RA   R   R  R   R=  R  Rh   (   R/   RB  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_formatdate_usegmtM  s    c         C   s   |  i  t i d  d   d  S(   NR   (   RA   R   R  RG   (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parsedate_noneV  s    c         C   s&   |  i  t i d  t i d   d  S(   Ns   Wed,3 Apr 2002 14:58:26 +0800s   Wed, 3 Apr 2002 14:58:26 +0800(   RA   R   R  (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parsedate_compactY  s    c         C   s#   |  i  } | t i d  d  d  S(   Ns   25 Feb 2003 13:47:26 -0800i  i   i   i   i/   i   i    i   ii(
   i  i   i   i   i/   i   i    i   ii(   RA   R   t   parsedate_tz(   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parsedate_no_dayofweek^  s    	c         C   s#   |  i  } | t i d  d  d  S(   Ns   5 Feb 2003 13:47:26 -0800i  i   i   i   i/   i   i    i   ii(
   i  i   i   i   i/   i   i    i   ii(   RA   R   R  (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt#   test_parsedate_compact_no_dayofweekc  s    	c         C   s   |  i  } t i d  } t t i |   } | t i |  d  | d   | t t i d |   d  t i d  } t t i | d    } | t i |  d  | d   | t t i d | d    d  d  S(   Ns   5 Feb 2003 13:47:26 -0800i   s   %Yi  i	   (	   RA   R   R  t   intR9  t   mktimeR:  R=  R  (   R/   RC   t   timetupR  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt+   test_parsedate_acceptable_to_time_functionsh  s    	c         C   s?   |  i  t i d  d  |  i  t i t i d   d  d  S(   Ns   <>R   (   R   R   (   RA   R   t	   parseaddrt
   formataddr(   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_parseaddr_emptys  s    c         C   s   |  i  t i d  d  d  S(   Ns   A Silly Persons   person@dom.ains   A Silly Person <person@dom.ain>(   s   A Silly Persons   person@dom.ain(   RA   R   R  (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_noquote_dumpw  s    c         C   sW   |  i  t i d  d  d } d } |  i  t i t i | | f   | | f  d  S(   Ns   A (Very) Silly Persons   person@dom.ains*   "A \(Very\) Silly Person" <person@dom.ain>s   A \(Special\) Person(   s   A (Very) Silly Persons   person@dom.ain(   RA   R   R  R  (   R/   t   at   b(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_escape_dump|  s    c         C   sW   |  i  t i d  d  d } d } |  i  t i t i | | f   | | f  d  S(   Ns   Arthur \Backslash\ Foobars   person@dom.ains.   "Arthur \\Backslash\\ Foobar" <person@dom.ain>(   s   Arthur \Backslash\ Foobars   person@dom.ain(   RA   R   R  R  (   R/   R  R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_escape_backslashes  s    c         C   sy   d } d } d \ } } |  i  t i |  | | f  |  i  t i |  | | f  |  i  t i | | f  |  d  S(   Ns   John X. Doe <jxd@example.com>s   "John X. Doe" <jxd@example.com>s   John X. Does   jxd@example.com(   s   John X. Does   jxd@example.com(   RA   R   R  R  (   R/   R   t   yR  R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_name_with_dot  s    c         C   s#   d } |  i  t i |  d  d  S(   Ns   Foo
	Bar <foo@example.com>s   Foo Bars   foo@example.com(   s   Foo Bars   foo@example.com(   RA   R   R  (   R/   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multiline_from_comment  s    c         C   s   |  i  t i d  d  d  S(   Ns   A Silly; Persons   person@dom.ains"   "A Silly; Person" <person@dom.ain>(   s   A Silly; Persons   person@dom.ain(   RA   R   R  (   R/   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_quote_dump  s    c         C   s{   |  i  } | t i d  d  | t i d  d  | t i d  d  | t i d  d  | t i d  d  d  S(   Nt   hellos   hello
s   hello
s   hellos   hello
s	   hello

(   RA   R   t   fix_eols(   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_fix_eols  s    	c         C   s   |  i  } |  i } t   } t   } | | d  | | d  | | d  | d |  | d |  | d |  | | d  | | d  | | d  | d |  | d |  | d |  | | |  | | |  d  S(   Ns   us-asciis   US-ASCIIs   Us-AsCiIt   usasciit   USASCIIt   UsAsCiI(   RA   t   failIfEqualR   (   R/   RC   t   net   cset1t   cset2(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_charset_richcomparisons  s$    				c         C   s/   |  i  } | t i d d g  d d g  d  S(	   Ns   aperson@dom.ain (Al Person)s   Bud Person <bperson@dom.ain>s	   Al Persons   aperson@dom.ains
   Bud Persons   bperson@dom.ain(   s	   Al Persons   aperson@dom.ain(   s
   Bud Persons   bperson@dom.ain(   RA   R   t   getaddresses(   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_getaddresses  s
    		c         C   sm   |  i  } | t i d g  d g  | t i d g  d	 d
 d g  | t i d d g  d d g  d  S(   Ns   foo: ;R   s	   []*-- =~$s   *--s#   "Jason R. Mastaler" <jason@dom.ain>s   Jason R. Mastalers   jason@dom.ain(   R   R   (   R   R   (   R   R   (   R   s   *--(   R   R   (   s   Jason R. Mastalers   jason@dom.ain(   RA   R   R  (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_getaddresses_nasty  s    				c         C   s4   |  i  } t i d g  } | | d d d  d S(   s(   Test proper handling of a nested comments%   User ((nested comment)) <foo@bar.com>i    i   s   foo@bar.comN(   RA   R   R  (   R/   RC   t   addrs(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt"   test_getaddresses_embedded_comment  s    	c         C   s?   |  i  } t   } | i d d d d | | i   d  d  S(   Ns   content-dispositionR   R$   s   foo\wacky"name(   RA   R	   R   RU   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_utils_quote_unquote  s
    		c         C   s&   t  d  } |  i | i   d  d  S(   Ns   not a charsetR   (   R   RA   t   get_body_encoding(   R/   RE   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt)   test_get_body_encoding_with_bogus_charset  s    c         C   st  |  i  } t   } d | d <| | d d  | i   } | t |  d  | | d d  t | d  } | | i   d  | i d d	 | | | i   d
  | | i d t  d  | | d d  t   } d | d <| i   } | t |  d  | | d d  t | d  } | | i   t	 i
  | i d d	 | | | i   d  | | d d  d  S(   Ns   text/plain; charset=UTF-8s   Content-Types   content-typei   i    s   utf-8R   s   hello worldRE   s   aGVsbG8gd29ybGQ=
Rg   s   content-transfer-encodings   text/plain; charset="US-ASCII"s   us-asciiR   (   RA   R	   RQ   RG  R   R  RN   RT   Rh   R   t   encode_7or8bit(   R/   RC   R:   RR   RE   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt-   test_get_body_encoding_with_uppercase_charset  s.    		
	
c         C   s8   t  d  } t  d  } |  i | i   | i    d  S(   Ns   us-asciis   US-ASCII(   R   RA   R  (   R/   t   lct   uc(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_charsets_case_insensitive  s    c         C   sH   |  i  } |  i d  } t   } t i | |  | | i   d  d  S(   Ns
   msg_43.txtsB  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
(   R6   R;   R    R   R^  R.   (   R/   RC   R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt1   test_partial_falls_inside_message_delivery_status  s    		(    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  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s<   																										
					t   TestIteratorsc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s   |  i  } |  i } |  i d  } t i |  } t |  } | t |  d  | t i |  | i	    |  i d  } t i |  } t |  } | t |  d  t
 d  } z  | t i |  | i    Wd  | i   Xd  S(   Ns
   msg_01.txti   s
   msg_02.txti+   s
   msg_19.txt(   RA   R6   R;   R   t   body_line_iteratorR  RG  t   EMPTYSTRINGR    RT   R&   Ro   R9   (   R/   RC   Rp  R:   t   itR   R5   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_body_line_iterator+	  s    		 c         C   s   |  i  } |  i d  } t i | d  } g  } d } x+ | D]# } | d 7} | i | i    q= W| | d  | t i |  d  d  S(   Ns
   msg_04.txtRq   i    i   i   s`   a simple kind of mirror
to reflect upon our own
a simple kind of mirror
to reflect upon our own
(   RA   R;   R   t   typed_subpart_iteratorR   RT   R  R    (   R/   RC   R:   R  R   t   subpartsRY   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_typed_subpart_iterator?	  s    	 
c         C   s   |  i  } |  i d  } t i | d d  } g  } d } x+ | D]# } | d 7} | i | i    q@ W| | d  | t i |  d  d  S(   Ns
   msg_03.txtRq   R   i    i   s%   
Hi,

Do you like this message?

-Me
(   RA   R;   R   R  R   RT   R  R    (   R/   RC   R:   R  R   R  RY   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt(   test_typed_subpart_iterator_default_typeP	  s    	 
(   R<   R=   R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  *	  s   		t   TestParsersc           B   sb   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   c         C   s   |  i  } t d  } z t   i |  } Wd  | i   X| | d d  | | d d  | | i   d  |  i | i    |  i t	 | i
   t   d  S(   Ns
   msg_02.txtRy   s   ppp-request@zzz.orgRx   s   ppp@zzz.orgs   multipart/mixed(   RA   R&   R   t   parseR9   RI   R   R/  R}   Ri  RT   R(   (   R/   RC   R5   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_parserf	  s    	c         C   sQ   |  i  } t i d  } | | d d  | | d d  | | i   d  d  S(   Ns   From: 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  s!   the next line has a space on it
 s
   message-idt   spams   Here's the message body
(   RA   R7   R   RT   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_whitespace_continuationt	  s    			c         C   sQ   |  i  } t i d  } | | d d  | | d d  | | i   d  d  S(   Ns   From: 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  s!   the next line has a space on it
 s
   message-idR"  s   Here's the message body
(   RA   R7   R   RT   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt(   test_whitespace_continuation_last_header	  s    			c         C   s   |  i  } t d d d } z t   i |  } Wd  | i   X| t | i    d  | i d  } | | i   d  | | i   d  | i d  } | | i   d	  d  S(
   Ns
   msg_26.txtR%   R  i   i    s
   text/plains!   Simple email with attachment.

i   s   application/riscos(   RA   R&   R   R   R9   RG  RT   RI   (   R/   RC   R5   R:   t   part1t   part2(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_crlf_separation	  s    	c   	      C   s  |  i  } |  i } t d  } z t i |  } Wd  | i   X| | i   d  | t | i    d  | i d  } | | i	   d  | | i   d  | t | i    d  | i d  } | | i   d  | | i	   d  | | i   d  | i d  } | | i	   d  | | i   d  | t | i    d  | i d  } | | i   d  | | i	   d  | | i   d  d  S(	   Ns
   msg_28.txti   i   i    s   message/rfc822s
   text/plains
   message 1
s
   message 2
(
   RA   R6   R&   R7   R8   R9   R/  RG  RT   RI   (	   R/   RC   Rp  R5   R:   R%  t   part1aR&  t   part2a(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt-   test_multipart_digest_with_extra_mime_headers	  s0    		c         C   s?   d d d g } t  i t i |   } |  i | d d  d  S(   Ns$   From: Andrew Person <aperson@dom.ains   Subject: Tests%   Date: Tue, 20 Aug 2002 16:43:45 +1000t   dates   Tue, 20 Aug 2002 16:43:45 +1000(   R7   R   R,   R    RA   (   R/   R   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_three_lines	  s
    	c         C   sd   |  i  } d } d } d | | f } t i |  } | | i d  |  | | i d  |  d  S(   NRq   s	   more texts'   Header: %s
Next-Header: %s

Body

R   s   Next-Header(   RA   R7   R   t   get(   R/   RC   t   value1t   value2R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt3   test_strip_line_feed_and_carriage_return_in_headers	  s    	c         C   sz   |  i  } d } t i |  } | t | i    d  | i   } | i   | | d d d g  | | i   d  d  S(   Ns(   >From: foo
From: bar
!"#QUX;~: zoo

bodyi   s   !"#QUX;~s   >FromRv   t   body(   RA   R7   R   RG  R   R  RT   (   R/   RC   R
  R:   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2822_header_syntax	  s    	
c         C   s;   |  i  } d } t i |  } | t | i    d  d  S(   Ns<   >From foo@example.com 11:25:53
From: bar
!"#QUX;~: zoo

bodyi    (   RA   R7   R   RG  R   (   R/   RC   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt(   test_rfc2822_space_not_allowed_in_header	  s    	c         C   sa   |  i  } d } t i |  } | i   } | i   | | d d d g  | | i   d  d  S(   Ns7   A: first header
B: second header
CC: third header

bodyt   At   Bt   CCR1  (   RA   R7   R   R   R  RT   (   R/   RC   R
  R:   t   headers(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt!   test_rfc2822_one_character_header	  s    	
(   R<   R=   R!  R#  R$  R'  R*  R,  R0  R2  R3  R8  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  e	  s   					"			
	t
   TestBase64c           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s   |  i  } | t i d  t t i d d d   x t d  D] } | d j o
 d } nc | d j o
 d } nL | d j o
 d	 } n5 | d
 j o
 d } n | d j o
 d } n d } | t i d |  |  qA Wd  S(   NR  t   eolR   i   i    i   i   i   i   i	   i   i   i   R   (   RA   R   t
   base64_lenRG  R   R   (   R/   RC   t   sizet   bsize(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_len	  s"    	  
 
 
 
 
c         C   sk   |  i  } | t i d  d  | t i d  d  | t i d d  d  | t i d d  d  d  S(   NR   s   aGVsbG8=R  t   Xs   aGVsbG8NCndvcmxk
t   helloXworld(   RA   R   Rg   (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_decode
  s
    	c         C   s   |  i  } | t i d  d  | t i d  d  | t i d  d  | t i d d  d  | t i d d	 d
 d d  | t i d d	 d
 d d d d  d  S(   NR   R  s	   aGVsbG8=
s   hello
s	   aGVsbG8K
i    s   aGVsbG8NCg==
s   xxxx i   R   i(   s   eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
R:  s   
s   eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
(   RA   R   R   (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_encode
  s    	c         C   s   |  i  } t i } | | d  d  | | d  d  | | d d d d  | | d d t d	  | | d
 d d d d  | | d
 d d d d d d  d  S(   NR  s   =?iso-8859-1?b?aGVsbG8=?=s   hello
worlds!   =?iso-8859-1?b?aGVsbG8NCndvcmxk?=RE   s
   iso-8859-2s   =?iso-8859-2?b?aGVsbG8=?=t	   keep_eolss!   =?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=s   xxxx i   R   i(   s   =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHggeHg=?=
 =?iso-8859-1?b?eHggeHh4eCB4eHh4IHh4eHg=?=
 =?iso-8859-1?b?IHh4eHggeHh4eCB4eHh4IHg=?=
 =?iso-8859-1?b?eHh4IHh4eHggeHh4eCB4eHg=?=
 =?iso-8859-1?b?eCB4eHh4IHh4eHggeHh4eCA=?=
 =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHgg?=R:  s   
s  =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHggeHg=?=
 =?iso-8859-1?b?eHggeHh4eCB4eHh4IHh4eHg=?=
 =?iso-8859-1?b?IHh4eHggeHh4eCB4eHh4IHg=?=
 =?iso-8859-1?b?eHh4IHh4eHggeHh4eCB4eHg=?=
 =?iso-8859-1?b?eCB4eHh4IHh4eHggeHh4eCA=?=
 =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHgg?=(   RA   R   t   header_encodeRh   (   R/   RC   t   he(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_encode!
  s    		(   R<   R=   R>  RA  RB  RF  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR9  	  s   			t
   TestQuopric           B   sY   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         C   s  g  } t  t d  t d  d  D] } | t |  q$ ~ g  } t  t d  t d  d  D] } | t |  qa ~ g  } t  t d  t d  d  D] } | t |  q ~ d d	 d
 d d d g |  _ g  } t  d  D]- } t |  |  i j o | t |  q q ~ |  _ t |  i  t |  i  d j p t  g  } t  t d  t d  d  D] } | t |  qm~ d g |  _ |  i i d  g  } t  d  D]- } t |  |  i j o | t |  qq~ |  _	 t |  i  t |  i	  d j p t  d  S(   NR  t   zi   R4  t   Zt   0t   9t   !t   *R6  R5  t   /R   i   t   ~s   	t   =(
   R   t   ordt   chrt   hlitt   hnonRG  t   AssertionErrort   blitt   removet   bnon(   R/   RV   R   t   _[2]t   _[3]t   _[4]t   _[5]t   _[6](    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR  ?
  s    J*JJc         C   sX   x' |  i  D] } |  i t i |   q
 Wx' |  i D] } |  i t i |   q4 Wd  S(   N(   RS  R   R   t   header_quopri_checkRT  R}   (   R/   t   c(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_quopri_checkK
  s    
 
 c         C   sX   x' |  i  D] } |  i t i |   q
 Wx' |  i D] } |  i t i |   q4 Wd  S(   N(   RV  R   R   t   body_quopri_checkRX  R}   (   R/   R_  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_body_quopri_checkQ
  s    
 
 c      
   C   s   |  i  } t i } t i } x= d	 D]5 } | | |  t | | d d d d  d  q" Wx$ |  i D] } | | |  d  qe Wx$ |  i D] } | | |  d  q Wd  S(
   NR  s
   h@e@l@l@o@RE   R   R:  i   i   i   (   s   hellos
   h@e@l@l@o@(   RA   R   t   header_quopri_lenRD  RG  RS  RT  (   R/   RC   t   hqlt   encRr   R_  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_quopri_lenW
  s    			 3
 
 c         C   sd   |  i  } t i } x$ |  i D] } | | |  d  q Wx$ |  i D] } | | |  d  qC Wd  S(   Ni   i   (   RA   R   t   body_quopri_lenRV  RX  (   R/   RC   t   bqlR_  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_body_quopri_lenc
  s    		
 
 c         C   sI   xB t  d  D]4 } t |  } |  i t i t i |   |  q Wd  S(   Ni   (   R   RR  RA   R   R   t   quote(   R/   R   R_  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_quote_unquote_idempotentk
  s     c         C   s   |  i  } t i } | | d  d  | | d  d  | | d d d d  | | d d t d	  | | d
  d  | | d d d d d  | | d d d d d d d  d  S(   NR  s   =?iso-8859-1?q?hello?=s   hello
worlds!   =?iso-8859-1?q?hello=0D=0Aworld?=RE   s
   iso-8859-2s   =?iso-8859-2?q?hello?=RC  s   =?iso-8859-1?q?hello=0Aworld?=s   hellotheres   =?iso-8859-1?q?hello=C7there?=s   xxxx i   R   i(   s   =?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xx?=
 =?iso-8859-1?q?xx_xxxx_xxxx_xxxx_xxxx?=
 =?iso-8859-1?q?_xxxx_xxxx_xxxx_xxxx_x?=
 =?iso-8859-1?q?xxx_xxxx_xxxx_xxxx_xxx?=
 =?iso-8859-1?q?x_xxxx_xxxx_?=R:  s   
s   =?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xx?=
 =?iso-8859-1?q?xx_xxxx_xxxx_xxxx_xxxx?=
 =?iso-8859-1?q?_xxxx_xxxx_xxxx_xxxx_x?=
 =?iso-8859-1?q?xxx_xxxx_xxxx_xxxx_xxx?=
 =?iso-8859-1?q?x_xxxx_xxxx_?=(   RA   R   RD  Rh   (   R/   RC   RE  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRF  p
  s    		c         C   sk   |  i  } | t i d  d  | t i d  d  | t i d d  d  | t i d d  d  d  S(   NR   R  R?  s   hello
worldR@  (   RA   R   Rg   (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRA  
  s
    	c         C   s   |  i  } | t i d  d  | t i d  d  | t i d  d  | t i d d  d  | t i d d d d	 d
  | t i d d d d	 d d d  | t i d  d  d  S(   NR   R  s   hello
worlds   hello
worldi    s   xxxx i   R   i(   sj   xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20R:  s   
sl   xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20s   one line

two line(   RA   R   R   (   R/   RC   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRB  
  s    		(   R<   R=   R  R`  Rb  Rf  Ri  Rk  RF  RA  RB  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRG  >
  s   								t   TestCharsetc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s8   d d k  l } y | i d =Wn t j
 o n Xd  S(   Ni(   RE   t   fake(   R7   RE   t   CHARSETSR   (   R/   t   CharsetModule(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   tearDown
  s
    c         C   so   |  i  } t d  } d } | i |  } | | | i |   d } | i |  } | | | i |   d  S(   Ns   us-asciis   Hello World!s
   (   RA   R   t   to_splittablet   from_splittable(   R/   RC   R_  Rr   t   sp(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_idempotent
  s    	c         C   s  |  i  } t d  } | d | i d   t d  } | d | i d   t d  } | d | i d   t d  } y3 | d	 | i d
   | d
 | i d
 t   Wn t j
 o n Xd d k l } | i d | i d   t d  } | d | i d   d  S(   Ns
   iso-8859-1s   hello w=F6rlds   hello wrlds   utf-8s   aGVsbG8gd29ybGQ=
s   hello worlds   us-asciis   euc-jps   $B5FCO;~IW(Bs   ϻi(   RE   Rm  (
   RA   R   t   body_encodeR   t   LookupErrorR7   RE   t   add_charsett   QPRG   (   R/   RC   R_  Ro  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_body_encode
  s&    	c         C   s<   t  d  } |  i t |  d  |  i t i t  d  d  S(   Nu   us-asciis   us-asciis   ascii(   R   RA   R(   Rb   R   t   CharsetError(   R/   RE   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_unicode_charset_name
  s    (   R<   R=   Rp  Rt  Ry  R{  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyRl  
  s   			t
   TestHeaderc           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z RS(   c         C   sL   |  i  } t d  } | | i   d  | i d  | | i   d  d  S(   Ns   Hello World!s    Goodbye World!s   Hello World!  Goodbye World!(   R6   R   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_simple
  s
    	c         C   sL   |  i  } t d  } | | i   d  | i d  | | i   d  d  S(   Ns   Hello World!s   Goodbye World!s   Hello World! Goodbye World!(   R6   R   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_simple_surprise
  s
    	c         C   s)   d } |  i  t |  | d  f g  d  S(   Ns   no decoding needed(   RA   R   RG   (   R/   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_needs_no_decoding
  s    c         C   sU   t  d d d } x< | i d d  i d  D] } |  i t |  d j  q. Wd  S(   Ns  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   iL   t
   splitcharsR   s   
 (   R   R   R   R}   RG  (   R/   R   t   l(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt	   test_long
  s
    		 c         C   s  |  i  } t d  } t d  } t d  } d } d } d i d  } t | |  } | i | |  | i | |  | i   }	 | |	 d  | t |	  | d f | d f | d f g  t |  }
 | |
 i d  d  t t |	   } | | |	  d  S(	   Ns
   iso-8859-1s
   iso-8859-2s   utf-8s   Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an sdlndischen Wandgemlden vorbei, gegen die rotierenden Klingen befrdert. s;   Finanni metropole se hroutily pod tlakem jejich dvtipu.. u   正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.」と言っています。s  =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerderband_ko?=
 =?iso-8859-1?q?mfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndischen_Wan?=
 =?iso-8859-1?q?dgem=E4lden_vorbei=2C_gegen_die_rotierenden_Klingen_bef=F6?=
 =?iso-8859-1?q?rdert=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?q?_Nunstuck_git_und_Slotermeyer=3F_Ja!_Beiherhund_das_Oder_die_Fl?=
 =?utf-8?b?aXBwZXJ3YWxkdCBnZXJzcHV0LuOAjeOBqOiogOOBo+OBpuOBhOOBvuOBmQ==?=
 =?utf-8?b?44CC?=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.」と言っています。(   R6   R   R   R   R   R   R}  R   (   R/   RC   Rs   R   R   R   R   R   R   Re  t   ustrt   newh(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_multilingual   s*    	c         C   sF   |  i  } t   } | | d  | i d t d   | | d  d  S(   NR   Rl   s
   iso-8859-1s   =?iso-8859-1?q?foo?=(   R6   R   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_header_ctor_default_args1  s
    		c         C   s   |  i  } d } t |  } | | i   d  t | d d } | | i   d  t | d d d d } | | i   |  d  S(   Ns|   A very long line that must get split to something other than at the 76th character boundary to test the non-default behaviors}   A very long line that must get split to something other than at the 76th
 character boundary to test the non-default behaviorR   R   s}   A very long line that must get split to something other than at the
 76th character boundary to test the non-default behaviorR   i   (   R6   R   R   (   R/   RC   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_explicit_maxlinelen8  s    	c         C   sN   |  i  } d } t |  } | | d g  t |  } | | | i    d  S(   NR  (   s   helloN(   RA   R   RG   R   R   (   R/   RC   Rr   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_us_ascii_headerF  s    	c         C   s3   |  i  } t   } | i d d  | | d  d  S(   NR  s
   iso-8859-1s   =?iso-8859-1?q?hello?=(   RA   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_string_charsetN  s    		c         C   sQ   |  i  } t d d  } | | i   d  t d d  } | | i   d  d  S(   Nu   pöstals   utf-8s   =?utf-8?q?p=C3=B6stal?=u   菊地時夫s   =?utf-8?b?6I+K5Zyw5pmC5aSr?=(   RA   R   R   (   R/   RC   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_utf8_shortest]  s
    	c         C   s   |  i  } |  i } d } | t t |  t   } | t | i |  | t t | d d  |  | i | d d | t |  |  d  S(   Ns0   Ynwp4dUEbay Auction Semiar- No Charge  Earn BigR   t   replace(   Rb   RA   t   UnicodeErrorR   R   R(   (   R/   RI  RC   R   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_bad_8bit_headerd  s    			c         C   sq   |  i  } t   } | i d d  | i d  | i   } | | d  t t |   } | | i   |  d  S(   NR  s
   iso-8859-1t   worlds   =?iso-8859-1?q?hello?= world(   RA   R   R   R   R   R   (   R/   RC   R   Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt    test_encoded_adjacent_nonencodedo  s    		c         C   sT   |  i  } d } t |  } | | d d d	 g  t |  } | | i   d  d  S(
   NsG   Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztk=?= =?koi8-r?q?=CA?= zz.s   Subject:s     s   koi8-rs   zz.s6   Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztnK?= zz.(   s   Subject:N(   s     s   koi8-r(   s   zz.N(   RA   R   RG   R   R   (   R/   RC   Rr   t   partst   hdr(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_whitespace_eatery  s    	c         C   s&   |  i  } d } | t i t |  d  S(   NsX   Subject: =?EUC-KR?B?CSixpLDtKSC/7Liuvsax4iC6uLmwMcijIKHaILzSwd/H0SC8+LCjwLsgv7W/+Mj3IQ?=(   Rb   R   Rc   R   (   R/   RI  Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_broken_base64_header  s    	(   R<   R=   R}  R~  R  R  R  R  R  R  R  R  R  R  R  R  (    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR|  
  s   					1							
		t   TestRFC2231c           B   s   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   sN   |  i  } |  i d  } | | i d  d  | | i d d t d	  d  S(
   Ns
   msg_29.txtt   titles   us-asciit   ens%   This is even more ***fun*** isn't it!R   s'   "This is even more ***fun*** isn't it!"(   s   us-asciiR  s%   This is even more ***fun*** isn't it!(   s   us-asciiR  s'   "This is even more ***fun*** isn't it!"(   RA   R;   RJ   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s    	c         C   s   |  i  } t   } | i d d d d | | i d  d
  | i d d d d d d | | i d  d  |  i d  } | i d d d d d d | | i   d	  d  S(   NR  s%   This is even more ***fun*** isn't it!RE   s   us-asciiR   t   languageR  s
   msg_01.txts$  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
(   s   us-asciiR   s%   This is even more ***fun*** isn't it!(   s   us-asciis   ens%   This is even more ***fun*** isn't it!(   RA   R	   R   RJ   R;   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s    		c         C   sz   |  i  } |  i d  } | i d d d d d d | i d d	 d d d d | i d d
 d | | i   d  d  S(   Ns
   msg_01.txtRl   R   RE   s   us-asciiR  R  R  s%   This is even more ***fun*** isn't it!Rd   s   Content-Types&  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
(   R6   R;   R   R   R   (   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR     s    	c         C   s/   |  i  } |  i d  } | | i   d  d  S(   Ns
   msg_32.txts   us-ascii(   RA   R;   t   get_content_charset(   R/   RC   R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt    test_rfc2231_get_content_charset  s    	c         C   sN   d } t  i |  } | i d  } |  i t | t   |  i | d  d  S(   Ns  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

t   NAMEsM   file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm(   R7   R   RJ   R   Ri  t   tupleRA   (   R/   R
  R:   t   param(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt#   test_rfc2231_no_language_or_charset  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   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"

s)   This is even more ***fun*** is it not.pdf(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_rfc2231_no_language_or_charset_in_filename  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   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"

s)   This is even more ***fun*** is it not.pdf(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt7   test_rfc2231_no_language_or_charset_in_filename_encoded  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   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"

s1   This%20is%20even%20more%20***fun*** is it not.pdf(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_partly_encoded  s
    	c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   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"

s?   This%20is%20even%20more%20%2A%2A%2Afun%2A%2A%2A%20is it not.pdf(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_partly_nonencoded  s
    	c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   Content-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"

s)   This is even more ***fun*** is it not.pdf(   R7   R   RA   R]   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt/   test_rfc2231_no_language_or_charset_in_boundary  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   Content-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"

s)   this is even more ***fun*** is it not.pdf(   R7   R   RA   R  (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt.   test_rfc2231_no_language_or_charset_in_charset'  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   Content-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"

s)   This is even more ***fun*** is it not.pdf(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_rfc2231_bad_encoding_in_filename4  s    c         C   s/   d } t  i |  } |  i | i   d   d  S(   Ns:   Content-Type: text/plain; charset*=bogus''utf-8%E2%80%9D

(   R7   R   RA   R  RG   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt$   test_rfc2231_bad_encoding_in_charset@  s    c         C   s/   d } t  i |  } |  i | i   d   d  S(   Ns:   Content-Type: text/plain; charset*=ascii''utf-8%E2%80%9D

(   R7   R   RA   R  RG   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt%   test_rfc2231_bad_character_in_charsetJ  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns   Content-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�(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt&   test_rfc2231_bad_character_in_filenameT  s    c         C   s/   d } t  i |  } |  i | i   d  d  S(   Ns^   Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename*=X-UNKNOWN''myfile.txt

s
   myfile.txt(   R7   R   RA   RU   (   R/   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_unknown_encoding`  s    c         C   sa   |  i  } d } t i |  } | i d  \ } } } | | d   | | d   | | d  d  S(   NsJ   Content-Type: application/x-foo;
	name*0*="Frank's"; name*1*=" Document"

R   s   Frank's Document(   RA   R7   R   RJ   RG   (   R/   RC   R
  R:   RE   R  Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt-   test_rfc2231_single_tick_in_filename_extendedi  s    	c         C   sN   d } t  i |  } | i d  } |  i t | t   |  i | d  d  S(   NsG   Content-Type: application/x-foo; name*0="Frank's"; name*1=" Document"

R   s   Frank's Document(   R7   R   RJ   R   Ri  R  RA   (   R/   R
  R:   R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt$   test_rfc2231_single_tick_in_filenamev  s
    c         C   sa   |  i  } d } t i |  } | i d  \ } } } | | d  | | d  | | d  d  S(   NsY   Content-Type: application/x-foo;
	name*0*="us-ascii'en-us'Frank's"; name*1*=" Document"

R   s   us-asciis   en-uss   Frank's Document(   RA   R7   R   RJ   (   R/   RC   R
  R:   RE   R  Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt!   test_rfc2231_tick_attack_extended  s    	c         C   sN   d } t  i |  } | i d  } |  i t | t   |  i | d  d  S(   NsW   Content-Type: application/x-foo;
	name*0="us-ascii'en-us'Frank's"; name*1=" Document"

R   s   us-ascii'en-us'Frank's Document(   R7   R   RJ   R   Ri  R  RA   (   R/   R
  R:   R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_tick_attack  s
    c         C   s8   |  i  } d } t i |  } | | i d  d  d  S(   Ns:   Content-Type: application/x-foo; name="Frank's Document"

R   s   Frank's Document(   RA   R7   R   RJ   (   R/   RC   R
  R:   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   test_rfc2231_no_extended_values  s    	c         C   sa   |  i  } d } t i |  } | i d  \ } } } | | d  | | d  | | d  d  S(   Nsi   Content-Type: application/x-foo;
	name*0*="us-ascii'en-us'My";
	name*1=" Document";
	name*2*=" For You"

R   s   us-asciis   en-uss   My Document For You(   RA   R7   R   RJ   (   R/   RC   R
  R:   RE   R  Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt,   test_rfc2231_encoded_then_unencoded_segments  s    	c         C   sa   |  i  } d } t i |  } | i d  \ } } } | | d  | | d  | | d  d  S(   Nsi   Content-Type: application/x-foo;
	name*0="us-ascii'en-us'My";
	name*1*=" Document";
	name*2*=" For You"

R   s   us-asciis   en-uss   My Document For You(   RA   R7   R   RJ   (   R/   RC   R
  R:   RE   R  Rr   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt,   test_rfc2231_unencoded_then_encoded_segments  s    	(   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:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s.   		%											
	
					
					c          C   sO   t  i t }  g  } t |   D]* } | i d  o | t |  |  q q ~ S(   NR   (   t   syst   modulesR<   t   dirR   t   getattr(   t   modRV   R   (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   _testclasses  s    c          C   s:   t  i   }  x' t   D] } |  i t  i |   q W|  S(   N(   t   unittestt	   TestSuiteR  t   addTestt	   makeSuite(   t   suitet	   testclass(    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyR    s
    
 c          C   s"   x t    D] }  t |   q
 Wd  S(   N(   R  R   (   R  (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt	   test_main  s    
 t   __main__t   defaultTestR  (R   R   R  R9  R   R)   R  t   warningst	   cStringIOR    R7   t   email.charsetR   t   email.headerR   R   R   t   email.parserR   R   t   email.generatorR   R   t   email.messageR	   t   email.mime.applicationR
   t   email.mime.audioR   t   email.mime.textR   t   email.mime.imageR   t   email.mime.baseR   t   email.mime.messageR   t   email.mime.multipartR   R   R   R   R   R   R   t   test.test_supportR   R   t
   email.testR   R"   R,   R  R   R&   t   TestCaseR'   R>   R   R   R  R  R$  R(  R,  R2  Re  Rz  R  R  R  R  R  R9  RG  Rl  R|  R  R  R  R  R<   t   main(    (    (    s:   /mit/python/lib/python2.6/email/test/test_email_renamed.pyt   <module>   s     B"1+ |r/ ; F;Ho: 8			