403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.145
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_email/__pycache__/test_email.cpython-315.opt-1.pyc
R
>lqjq�c�N�]PHs]PHs]PHs]PHs]PHs]QHGsGs]QH G	s	]QH(Gs]QH0G
s
]QH8Gs]PH@s]PHDs]PHHs]QHLGs]QHTGsGsGs]QHdGsGsGs]Q	HtGs]Q
H|G s ]QH�G"s"]QH�G$s$]Q
H�G&s&]QH�G(s(]QH�G*s*]QH�G,s,]QH�G.s.]QH�G0s0]QH�G2s2G3s3]QH@G4s4]QH@G5s5]QH@G6s6]QH@G7s7]QH@G8s8]QH@G9s9]QH�G;s;]QH�G=s=]QH�G>s>]QH�G@s@]QCHGBsBGCsC]QH�GDsDQ sEPsFQ!sGQ"Q#\C2sHQ$Q%\O�2sJQ&Q'\C2sKQ(Q)\O�2sLQ*Q+\O�2sMQ,Q-\O�2sNQ.Q/\O�2sOQ0Q1\O�2sPQ2Q3\C2sQQ4Q5\C2sRQ6Q7\C2sSQ8Q9\C2sTQ:Q;\C2sUQ<Q=\C2sVQ>Q?\C2sWQ@QA\C2sXQBQC\C2sYQDQE\C2sZQFQG\C2s[QHQI2s\QJQK\\\V2s]QLQM\\\V2s^QNQO\O�2s_QPQQ\O�2s`QRQS\O�2saQTQU\C2sbQVQW\C2scQXQY\C2sdQZQ[\C2se\fQ\6Xc\O�2P!P!)]�)�StringIO�BytesIO)�chain��choice)�Thread)�patch)�Charset)�	Generator�DecodedGenerator�BytesGenerator)�Header�
decode_header�make_header)�HeaderRegistry)�Message)�MIMEApplication)�	MIMEAudio)�MIMEBase)�	MIMEImage)�MIMEMessage)�
MIMEMultipart)�MIMENonMultipart)�MIMEText)�Parser�HeaderParser)�
base64mime)�encoders��errors)�	iterators)�
quoprimime)�utils)�support)�threading_helper)�warnings_helper)�unlink)�openfile�
TestEmailBase)�
FeedParser�
� c�J`�\sQs]:snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Q s#Q!s$Q"s%Q#s&Q$s'Q%s(Q&s)Q's*Q(s+Q)s,Q*s-Q+s.Q,s/Q-s0Q.s1Q/s2Q0s3Q1s4Q2s5Q3s6Q4s7Q5s8Q6s9Q7s:Q8s;Q9s<Q:s=Q;s>Q<s?Q=s@Q>sAQ?sBQ@sCQAsDQBsEQCsFQDsGQEsHQFsIQGsJQHsKQIsLQJsMQKsNQLsOQMsPQNsQQOsRQPsSQQsTQRsUQSsVQTsWQUsXQVsYQWsZQXs[QYs\QZs]Q[s^Q\s_Q]s`UsaP!)^�TestMessageAPIc��UOoUOQ2oUUOQ2,QN2UUOQQ2Q2P!)z
msg_20.txt�cc�xxzn/a)zccc@zzz.orgzddd@zzz.orgzeee@zzz.org)�assertEqual�_msgobj�get_all��self�eq�msgs&  �/C:\Python315\\Lib\test\test_email\test_email.py�test_get_all�TestMessageAPI.test_get_all;sD��
�
�
���l�l�<�(��
�3�;�;�t��K�L�
�3�;�;�t�U�#�U�+�c��UOo[2oUUO2P2[Q2oUO	U2UUQ*Q2UUO2Q2UUQ*Q2UUO
Q2Q2UUQ*Q	2UUO2OQ2UO	P2UUO2P2UUQ*Q2[2oQ
UQ$QUQ
$QUQ$UO	U2UUQ*Q
2UUQ*Q2UUQ*Q2P!)N�
iso-8859-1�mime-versionz1.0�
text/plain�content-typez text/plain; charset="iso-8859-1"�charset�content-transfer-encoding�quoted-printablez2.0zMIME-Versionztext/x-weird�Content-Typezquinted-puntable�Content-Transfer-Encodingz"text/x-weird; charset="iso-8859-1")r1r�get_charsetr	�set_charset�get_content_type�	get_param�
input_charset�r5r6r7rAs&   r8�test_getset_charset�"TestMessageAPI.test_getset_charsetAs6��
�
�
���i��
�3�?�?��d�#��,�'������ �
�3�~���&�
�3���!�<�0�
�3�~�� B�C�
�3�=�=��#�\�2�
�3�*�+�-?�@�
�3�?�?��*�*�L�9������
�3�?�?��d�#�
�3�~���-��i��#��N��,��N��+=��'�(����� �
�3�~���&�
�3�~�� D�E�
�3�*�+�-?�@r;c��UOo[2oUOQ2UUO2OQ2UUQ*Q2P!)�us-asciir@�text/plain; charset="us-ascii")r1rrGrFrJr4s&  r8�test_set_charset_from_string�+TestMessageAPI.test_set_charset_from_string[sG��
�
�
���i�����
�#�
�3�?�?��*�*�J�7�
�3�~�� @�Ar;c��[2o[Q2oUOQU2UOUO	2O
Q2P!)r=zThis is a string payload)rr	�set_payloadr1rFrJ)r5r7rAs&  r8�test_set_payload_with_charset�,TestMessageAPI.test_set_payload_with_charsetbs?���i���,�'�����2�G�<�������*�8�8�,�Gr;c��Qo[Q2o[2oUOV2UOUQ*Q2UOUO	P	Q5U2UOUO	2Q2P!)�АБВ�utf-8rB�base64��decodez	0JDQkdCS
)r	rrTr1�get_payload�r5�datarAr7s&   r8�+test_set_payload_with_8bit_data_and_charset�:TestMessageAPI.test_set_payload_with_8bit_data_and_charsethsl��*���'�"���i������&�����8�9�8�D���������5�t�<�������*�L�9r;c��Qo[Q2oPUm[2oUOUO	Q2U2UOUQ*Q2UOUO
P	Q5U2P!�rXrYrB�8bitr[)r	�
body_encodingrrTr\r1r]r^s&   r8�>test_set_payload_with_non_ascii_and_charset_body_encoding_none�MTestMessageAPI.test_set_payload_with_non_ascii_and_charset_body_encoding_noneqsh��*���'�"�� $����i��������G�,�g�6�����8�9�6�B���������5�t�<r;c���Qo[Q2oPUm[2oUOV2UO	UQ*Q2UO	UOP	Q5U2P!rc)r	rerrTr1r]r^s&   r8�>test_set_payload_with_8bit_data_and_charset_body_encoding_none�MTestMessageAPI.test_set_payload_with_8bit_data_and_charset_body_encoding_nonezs]��*���'�"�� $����i������&�����8�9�6�B���������5�t�<r;c�~�[2oUO,2UOUO2,2P!�N�rrTr1r]�r5r7s& r8�test_set_payload_to_list�'TestMessageAPI.test_set_payload_to_list�s,���i�������������*�B�/r;c��[2oQUQ$UOQ2[[22oUO[QUO
U2P!)�multipart/mixedrDzstring payloadz[Aa]ttach.*non-multipart)rrTr�assertRaisesRegex�	TypeError�attach)r5r7�sub_msgs&  r8�"test_attach_when_payload_is_string�1TestMessageAPI.test_attach_when_payload_is_string�sH���i��/��N�����(�)��g�i�(�����y�*D�"�z�z�7�	4r;c�*�UOoUOQ2oUO2oUU,QN2UOQ2oUOQ2oUU,QN2UOQ2oUO2oUU,QN2P!)z
msg_08.txtz
msg_09.txt�dingbatz
msg_12.txt)NrOr=�
iso-8859-2�koi8-r)rzrOr=rzr|)NrOr=Nr{z
iso-8859-3rOr|)r1r2�get_charsets)r5r6r7�charsetss&   r8�test_get_charsets� TestMessageAPI.test_get_charsets�s���
�
�
���l�l�<�(���#�#�%��
�8�M�N��l�l�<�(���#�#�I�.��
�8� �	!��l�l�<�(���#�#�%��
�8�:�	;r;c�.�UOoUOQ2oUO2Tt,tFDp3O2MJ	ooUUQQ,2UOQ2oUO]2oUUO2Q2P!ttoh)�
msg_04.txt�msg.txt�
msg_07.txt�dingusfish.gif�r1r2r]�get_filename)r5r6r7�p�	filenames�subparts&     r8�test_get_filename� TestMessageAPI.test_get_filename�s���
�
�
���l�l�<�(��/2���/@�A�/@�!�^�^�%�/@�	�A�
�9�y�)�,�-��l�l�<�(���/�/�!�$��
�7���!�#3�4��Bs�Bc��UOoUOQ2oUO2Tt,tFDp3O2MJ	ooUUQQ,2P!ttoh)z
msg_44.txtr�r�)r5r6r7r�r�s&    r8�%test_get_filename_with_name_parameter�4TestMessageAPI.test_get_filename_with_name_parameter�sR��
�
�
���l�l�<�(��/2���/@�A�/@�!�^�^�%�/@�	�A�
�9�y�)�,�-��Bs�Ac�p�UOoUOQ2oUUO2Q2P!)r��BOUNDARY)r1r2�get_boundaryr4s&  r8�test_get_boundary� TestMessageAPI.test_get_boundary�s.��
�
�
���l�l�<�(��
�3����z�*r;c��UOoUOQ2oUOQ2UO2]*vq4UUO	2Q2UUQ2UOQ2oUOQ2UO2]*vq4UUO	2Q2UUQ2UOQ2oUO[OUOQ2P!)�
msg_01.txtr�r@z3text/plain; charset="us-ascii"; boundary="BOUNDARY"r�z$multipart/mixed; boundary="BOUNDARY"�
msg_03.txt)r1r2�set_boundary�items�lower�assertRaisesr�HeaderParseError)r5r6r7�header�values&    r8�test_set_boundary� TestMessageAPI.test_set_boundary�s���
�
�
���l�l�<�(������$��	�	��A��
��
�6�<�<�>�>�*�
�5�G�H��l�l�<�(������$��	�	��A��
��
�6�<�<�>�>�*�
�5�8�9��l�l�<�(�����&�1�1��*�*�J�	8r;c��[Q2oUOUO2]*]*Q2UO2UO	UO2]*]*Q2P!)z	form-datazmultipart/form-dataz!multipart/form-data; boundary="==)rr1r��	as_string�assertStartsWithrns& r8�test_make_boundary�!TestMessageAPI.test_make_boundary�sZ���K�(��	
�������Q���*�,A�B��
�
�����c�i�i�k�!�n�Q�/�A�	Cr;c�R�[QQQ59^tt^2oUO2oPPP2[2oUOW2o[	2o[UP	]2oUO
UP
2UOUO2U2P!)%fhKv9h)�
msg_46.txtrY��encoding)	r'�readr�parsestrrr
�flattenr1�getvalue�r5�fp�msgdata�parserr7�out�gens&      r8�test_message_rfc822_only�'TestMessageAPI.test_message_rfc822_only�sz���l�W�
5�
5���g�g�i�G�6�����o�o�g�&���j����T�1�%�����C�����������1�6�
5�s�B�B&	�B&	c��[QQQ59^tt^2oUO2OQ2oPPP2[OO2oUO
W2o[2o[OOU2oUOU2UOUO2U2P!)%fhK�9h)r�rYr��ascii)
r'r��encode�emailr��BytesHeaderParser�
parsebytesr�	generatorrr�r1r�r�s&      r8�test_byte_message_rfc822_only�,TestMessageAPI.test_byte_message_rfc822_only�s���
�l�W�
5�
5���g�g�i�&�&�w�/�G�6����/�/�1������(���i���o�o�,�,�S�1�����C����������1�6�
5�s� C
�
C	�C	c��UOoUOQ2oUUOP	Q5P2UUO]2OP	Q5Q2UUO]2OP	Q5Q2UUO]2OP	Q5Q2UUO]2OP	Q5Q2UUO]2OP	Q5Q2P!)z
msg_10.txtr[s This is a 7bit encoded message.
s-�This is a Quoted Printable encoded message!
s!This is a Base64 encoded message.s"This is a Base64 encoded message.
s/This has no Content-Transfer-Encoding: header.
)r1r2r]r4s&  r8�test_get_decoded_payload�'TestMessageAPI.test_get_decoded_payload�s���
�
�
���l�l�<�(��
�3�?�?�$�?�'��.�
�3�?�?�1��)�)��)�6�/�	1�	�3�?�?�1��)�)��)�6�?�	A�	�3�?�?�1��)�)��)�6�/�	1�	�3�?�?�1��)�)��)�6�1�	3�	�3�?�?�1��)�)��)�6�>�	@r;c��UOo[2oUOQ2QFD oV2Q$UUOP	Q5Q2J"	UOQ2UUOP	Q5Q2P!)z$begin 666 -
+:&5L;&\@=V]R;&0 
 
end
rBr[�hello world�foosfoo�z
x-uuencode�uuencode�uuezx-uue)r1rrTr])r5r6r7�ctes&   r8�test_get_decoded_uu_payload�*TestMessageAPI.test_get_decoded_uu_payloadsl��
�
�
���i�����C�D�=�C�/2�+�,��s���d��+�^�<�>�	�����
�3�?�?�$�?�'��0r;c�^�[2oUO[UO]2P!��)rr�rtr]rns& r8�*test_get_payload_n_raises_on_non_multipart�9TestMessageAPI.test_get_payload_n_raises_on_non_multiparts���i�����)�S�_�_�a�8r;c�>�UOoUOQ2o[QQQ59^tt^2oUO2oPPP2[	2o[U2oUO
U2UUO2W2P!)%fhKO9h)r�z
msg_17.txtrYr�)r1r2r'r�rrr�r�)r5r6r7r��text�s�gs&      r8�test_decoded_generator�%TestMessageAPI.test_decoded_generatorso��
�
�
���l�l�<�(��
�l�W�
5�
5���7�7�9�D�6��J���Q���	�	�	�#��
�1�:�:�<���6�
5�s�B�B	�B	c��[2oQUQ$QUQ$UOQU2UOQU2UOQU2UOQU2UOQU2UOQU2P!)�Me�From�You�to�from�FROM�To�TO)r�assertInrns& r8�test__contains__�TestMessageAPI.test__contains__ so���i����F����D�	��
�
�f�c�"��
�
�f�c�"��
�
�f�c�"��
�
�d�C� ��
�
�d�C� ��
�
�d�C� r;c��UOQ2o[QQQ59^tt^2oUO2oPPP2UOW[	U22UOP	Q5oUO
Q2oUOU]*Q2UOU[OUQ*22P!)%fhK�9h)r�rYr���unixfromr*zFrom �r�NN)
r2r'r�r1�strr��splitr��NL�join)r5r7r�r��fullrepr�liness&     r8�test_as_string�TestMessageAPI.test_as_string,s����l�l�<�(��
�l�W�
5�
5���7�7�9�D�6�����s�3�x�(��=�=�$�=�/�����t�$�����e�A�h��0�����r�w�w�u�R�y�1�2�
6�
5�s�C�C	�C	c��UOQ2oUOOQQ5oUOUQ5o[	2o[VBQ5oUO
U2UOV4O22P!�r��
��linesep��policy)	r2r��cloner�rr
r�r1r��r5r7�	newpolicyr�r�r�s&     r8�test_as_string_policy�$TestMessageAPI.test_as_string_policy6sg���l�l�<�(���J�J�$�$�V�$�4�	��=�=�	�=�2���J���a�*��	�	�	�#������:�:�<�0r;c���[OQ2oUOQ2o[OQ2o[OU2oUOUO
2U2P!)u�            MIME-Version: 1.0
            Content-type: text/plain; charset="iso-8859-1"

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

            Test if non-ascii messages with no Content-Transfer-Encoding set
            can be as_string'd:
            F=F6=F6 b=E4r
            )�textwrap�dedentr�r��message_from_bytesr1r��r5�m�source�expectedr7s&    r8�#test_nonascii_as_string_without_cte�2TestMessageAPI.test_nonascii_as_string_without_cte?s`���O�O��
�����,�'���?�?�$����&�&�v�.���������(�3r;c���[OQ2oUOQ2oUOQQ2o[O
U2oUO
UO2U2P!)u            MIME-Version: 1.0
            Content-type: text/plain; charset="us-ascii"
            Content-Transfer-Encoding: 8bit

            Test if non-ascii messages with no Content-Transfer-Encoding set
            can be as_string'd:
            Föö bär
            r=r��replace�r�r�r�r\r�r�r1r�r�s&    r8�*test_nonascii_as_string_with_ascii_charset�9TestMessageAPI.test_nonascii_as_string_with_ascii_charsetUs[���O�O��
�����,�'���=�=��)�4���&�&�v�.���������(�3r;c���[OQ2oUOQ2oUOQQ2o[O
U2oUO
UO2U2P!)u�            MIME-Version: 1.0

            Test if non-ascii messages with no Content-Type nor
            Content-Transfer-Encoding set can be as_string'd:
            Föö bär
            r=r�rrr�s&    r8�4test_nonascii_as_string_without_content_type_and_cte�CTestMessageAPI.test_nonascii_as_string_without_content_type_and_cteds[���O�O��
�����,�'���=�=��)�4���&�&�v�.���������(�3r;c���UOQ2o[QQQ59^tt^2oUO2OQ2oPPP2UO	W[U22UO
P	Q5oUOQ2oUOU]*Q2UO	UQOUQ*22P!)%fhK�9h)r�rYr�r�r��
sFrom r�)
r2r'r�r�r1�bytes�as_bytesr�r�r�)r5r7r�r_r�r�s&     r8�
test_as_bytes�TestMessageAPI.test_as_bytesqs����l�l�<�(��
�l�W�
5�
5���7�7�9�#�#�G�,�D�6�����u�S�z�*��<�<��<�.�����u�%�����e�A�h��1�����u�z�z�%��)�4�5�
6�
5�s� C�C!	�C!	c��UOQ2oUOOQQ5oUOUQ5o[	2o[VBQ5oUO
U2UOV4O22P!r�)	r2r�r�rrrr�r1r�r�s&     r8�test_as_bytes_policy�#TestMessageAPI.test_as_bytes_policy{sg���l�l�<�(���J�J�$�$�V�$�4�	��<�<�y�<�1���I���1�.��	�	�	�#������:�:�<�0r;c�v�[OQ2oUOUOQ2P2P!)zContent-Type: blarg; baz; boo
�baz�r��message_from_stringr1rIrns& r8�test_bad_param�TestMessageAPI.test_bad_param�s,���'�'�(I�J��������u�-�r�2r;c�x�[OQ2oUO2oUOUQ2P!)ziContent-Disposition: attachment; filename*="ignored"; filename*0*="utf-8''foo%20"; filename*1*="bar.txt"
zfoo bar.txt�r�rr�r1�r5r7�filenames&  r8�$test_continuation_sorting_part_order�3TestMessageAPI.test_continuation_sorting_part_order�s7���'�'�
(�
���#�#�%������=�1r;c�x�[OQ2oUO2oUOUQ2P!)z6Content-Disposition: attachment; filename*="bar.txt"; zbar.txtrrs&  r8�test_sorting_no_continuations�,TestMessageAPI.test_sorting_no_continuations�s7���'�'�
&�
���#�#�%������9�-r;c�t�[OQ2oUOUO2P2P!�z
From: foo
�r�rr1r�rns& r8�test_missing_filename�$TestMessageAPI.test_missing_filename��+���'�'�
�6������)�)�+�T�2r;c�t�[OQ2oUOUO2P2P!)z%Content-Disposition: blarg; filename
r&rns& r8�test_bogus_filename�"TestMessageAPI.test_bogus_filename�s.���'�'�0�2������)�)�+�R�0r;c�t�[OQ2oUOUO2P2P!r%�r�rr1r�rns& r8�test_missing_boundary�$TestMessageAPI.test_missing_boundary�r)r;c�t�UOo[OQ2oUUOQQ5,QN2[OQ2oUUOQQ5,QN2UUO2P2[OQ2oUUOQQ5,QN2P!)�&X-Header: foo=one; bar=two; baz=three
�x-header�r�z X-Header: foo; bar=one; baz=two
�"X-Header: foo; bar="one"; baz=two
))r��one)�bar�two�r�three))r��)r7r6)rr8)r1r�r�
get_paramsr4s&  r8�test_get_params�TestMessageAPI.test_get_params�s���
�
�
���'�'�5�7��
�3�>�>��>�,�=�	?��'�'�/�1��
�3�>�>��>�,�8�	:�
�3�>�>��T�"��'�'�1�3��
�3�>�>��>�,�8�	:r;c�h�[2oQUQ$UOUOQ2Q2P!)z>Content-Type: Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"rD�boundary�CPIMSSMTPC06p5f3tG)rr1rIrns& r8�test_get_param_liberal�%TestMessageAPI.test_get_param_liberal�s-���i��^��N��������z�2�4H�Ir;c��UOo[OQ2oUUOQQQ5Q2UUOQQQ5P2UUOQ2P2[OQ2oUUOQQQ5P2UUOQQQ5Q2UUOQ	QQ5Q2P!)
r2r7r3r4r8�quuzr5r�r6r�r1r�rrIr4s&  r8�test_get_param�TestMessageAPI.test_get_param�s���
�
�
���'�'�5�7��
�3�=�=��z�=�2�E�:�
�3�=�=��
�=�3�T�:�
�3�=�=�� �$�'��'�'�1�3��
�3�=�=��z�=�2�B�7�
�3�=�=��z�=�2�E�:�
�3�=�=��z�=�2�E�:r;c��UOQ2oUOUO]2OQ2Q2P!)z
msg_22.txt�namez
wibble.JPG)r2r1r]rIrns& r8�'test_get_param_funky_continuation_lines�6TestMessageAPI.test_get_param_funky_continuation_lines�s4���l�l�<�(���������+�5�5�f�=�|�Lr;c��[OQ2oUOUOQ2Q2UOUOQP
Q5Q2P!)z4Content-Type: image/pjpeg; name="Jim&amp;&amp;Jill"
rJzJim&amp;&amp;Jill��unquotez"Jim&amp;&amp;Jill"rrns& r8�#test_get_param_with_semis_in_quotes�2TestMessageAPI.test_get_param_with_semis_in_quotes�sP���'�'�C�E��������v�.�0C�D�������v�u��=�.�	0r;c���[OQ2oUOUOQ2Q2[OQ2oUOUOQ2Q2P!)z5Content-Type: foo; bar*0="baz\"foobar"; bar*1="\"baz"r7zbaz"foobar"bazrrns& r8�test_get_param_with_quotes�)TestMessageAPI.test_get_param_with_quotes�s^���'�'�E�G��������u�-�/?�@��'�'�K�M��������u�-�/?�@r;c�H�QoQFD�vq#UOV#UQ59^tt^2UQ0U]*
*U*o[OOU2oUO	[U2U2UO	[[
U22]2UO	U]*U2PPP2J�	QQU]*
**o[OOU2oUO	VV,2P!)%fhCJ9h)i��)r��r�N�;zs=")�r;r;)�foo=barrZ)z FOO = bar    rZ)�subTestr��message�_parseparamr1�len�set)r5rWr�rV�src�res�	malformeds&      r8� test_get_param_linear_complexity�/TestMessageAPI.test_get_param_linear_complexity�s���
��
�D�A�
����!��,�,���1�g��Q��'�!�+���m�m�/�/��4��� � ��S��1�-�� � ��S��X���2�� � ��Q���+�-�,�
��C�1�q�5�M�)�	��m�m�'�'�	�2������k�*�-�,�,�s�BD	�D!
�D!
c���[OQ2oUOQU2UOQU2UOQU2UOQU2P!)zHeader: existsr�r
�HEADER�headerx)r�rr��assertNotInrns& r8�test_field_containment�%TestMessageAPI.test_field_containment�sM���'�'�(8�9���
�
�h��$��
�
�h��$��
�
�h��$�����C�(r;c���UOo[2oUOQQ2UUOQ2Q2UOQQ2UUOQ2Q2UUOQP
Q5Q2UUO	2,Q	N2UUO	P
Q5,Q
N2UOQQQQ5UUOQQQ5Q2P!)rA�iso-2022-jp�
importance�
high valuerN�"high value"ziso-9999-xxzX-Jimmyr4)�r?r;)rArl)rmrn)rp)rAz
"iso-2022-jp")rmro)r1r�	set_paramrIr<r4s&  r8�test_set_param�TestMessageAPI.test_set_params���
�
�
���i���
�
�i��/�
�3�=�=��#�]�3��
�
�l�L�1�
�3�=�=��&��5�
�3�=�=��u�=�5�~�F�
�3�>�>��<�	=�	�3�>�>�%�>�(�+G�	H�	�
�
�i��y�
�A�
�3�=�=��9�=�5�}�Er;c�F�UOoUOQ2oUUO2,QN2UOQ2oUO	Q2UUO2QQ,2UOQU2UUO2QQQU1,2P!)�
msg_05.txt�report-type��multipart/reportr;�r@�%D1690A7AC1.996856090/mail.example.com)rw)rv�delivery-statusry)r1r2r<rI�	del_paramrq)r5r6r7�old_vals&   r8�test_del_param�TestMessageAPI.test_del_params���
�
�
���l�l�<�(��
�3�>�>��C�	D��-�-�
�.���
�
�m�$�
�3�>�>��$�A�C�	D�	�
�
�m�W�-�
�3�>�>��$�A�
�G�$�&�	'r;c��[2oUOQQQQ5UOQQ2UOUQ*Q2P!)�Content-Disposition�
attachment�bud.gif�rr�content-disposition�r�
add_headerr|r1rns& r8�test_del_param_on_other_header�-TestMessageAPI.test_del_param_on_other_header#sA���i�����,�l�Y��O��
�
�j�"7�8�����2�3�\�Br;c�@�[2oUOQQ2P!)rr�)rr|rns& r8�$test_del_param_on_nonexistent_header�3TestMessageAPI.test_del_param_on_nonexistent_header)s���i���
�
�j�"7�8r;c��[2oUOQQQQ5UQ*oUOQQQ5UOUQ*U2P!)rDr?rY�rA�foobarr4r�)r5r7�existing_headers&  r8�test_del_nonexistent_param�)TestMessageAPI.test_del_nonexistent_param.sJ���i�����~�|�W��E��n�-���
�
�h�~�
�6�����^�,�o�>r;c�>�UOo[2oUO[UOQ2UO	Q2UUQ*Q2UOQQ2UUQ*Q2UO	Q2UUQ*Q2P!)r�r?r@rArOrPz	text/htmlztext/html; charset="us-ascii")r1rr��
ValueError�set_typerqr4s&  r8�
test_set_type�TestMessageAPI.test_set_type5s��
�
�
���i�����*�c�l�l�F�;����\�"�
�3�~���-��
�
�i��,�
�3�~�� @�A����[�!�
�3�~�� ?�@r;c�|�[2oQUQ$UOQQ2UOUQ*Q2P!)r?zX-Content-Type�application/octet-streamzx-content-type)rr�r1rns& r8�test_set_type_on_other_header�,TestMessageAPI.test_set_type_on_other_header@s;���i�� ,�������/�1A�B�����-�.�0J�Kr;c�\�[2oUOUO2Q2P!)r?)rr1rHrns& r8�test_get_content_type_missing�,TestMessageAPI.test_get_content_type_missingFs"���i������-�-�/��>r;c�~�[2oUOQ2UOUO2Q2P!)�message/rfc822)r�set_default_typer1rHrns& r8�/test_get_content_type_missing_with_default_type�>TestMessageAPI.test_get_content_type_missing_with_default_typeJs2���i�����-�.�����-�-�/�1A�Br;c��UOQ2oUOUO]2O2Q2P!)�
msg_30.txtr��r2r1r]rHrns& r8�+test_get_content_type_from_message_implicit�:TestMessageAPI.test_get_content_type_from_message_implicitO�5���l�l�<�(���������+�<�<�>�)�	+r;c��UOQ2oUOUO]2O2Q2P!)�
msg_28.txtr�r�rns& r8�+test_get_content_type_from_message_explicit�:TestMessageAPI.test_get_content_type_from_message_explicitTr�r;c�j�UOQ2oUOUO2Q2P!)r�r?�r2r1rHrns& r8�6test_get_content_type_from_message_text_plain_implicit�ETestMessageAPI.test_get_content_type_from_message_text_plain_implicitY�)���l�l�<�(������-�-�/��>r;c�j�UOQ2oUOUO2Q2P!)r�r?r�rns& r8�6test_get_content_type_from_message_text_plain_explicit�ETestMessageAPI.test_get_content_type_from_message_text_plain_explicit]r�r;c�\�[2oUOUO2Q2P!)r��rr1�get_content_maintyperns& r8�!test_get_content_maintype_missing�0TestMessageAPI.test_get_content_maintype_missingas"���i������1�1�3�V�<r;c�~�[2oUOQ2UOUO2Q2P!)r�r\)rr�r1r�rns& r8�3test_get_content_maintype_missing_with_default_type�BTestMessageAPI.test_get_content_maintype_missing_with_default_typees1���i�����-�.�����1�1�3�Y�?r;c��UOQ2oUOUO]2O2Q2P!)r�r\�r2r1r]r�rns& r8�/test_get_content_maintype_from_message_implicit�>TestMessageAPI.test_get_content_maintype_from_message_implicitj�2���l�l�<�(���������+�@�@�B�I�Nr;c��UOQ2oUOUO]2O2Q2P!)r�r\r�rns& r8�/test_get_content_maintype_from_message_explicit�>TestMessageAPI.test_get_content_maintype_from_message_explicitnr�r;c�j�UOQ2oUOUO2Q2P!)r�r��r2r1r�rns& r8�:test_get_content_maintype_from_message_text_plain_implicit�ITestMessageAPI.test_get_content_maintype_from_message_text_plain_implicitr�)���l�l�<�(������1�1�3�V�<r;c�j�UOQ2oUOUO2Q2P!)r�r�r�rns& r8�:test_get_content_maintype_from_message_text_plain_explicit�ITestMessageAPI.test_get_content_maintype_from_message_text_plain_explicitvr�r;c�\�[2oUOUO2Q2P!)�plain�rr1�get_content_subtyperns& r8� test_get_content_subtype_missing�/TestMessageAPI.test_get_content_subtype_missingzs"���i������0�0�2�G�<r;c�~�[2oUOQ2UOUO2Q2P!)r��rfc822)rr�r1r�rns& r8�2test_get_content_subtype_missing_with_default_type�ATestMessageAPI.test_get_content_subtype_missing_with_default_type~s1���i�����-�.�����0�0�2�H�=r;c��UOQ2oUOUO]2O2Q2P!)r�r��r2r1r]r�rns& r8�.test_get_content_subtype_from_message_implicit�=TestMessageAPI.test_get_content_subtype_from_message_implicit��2���l�l�<�(���������+�?�?�A�8�Lr;c��UOQ2oUOUO]2O2Q2P!)r�r�r�rns& r8�.test_get_content_subtype_from_message_explicit�=TestMessageAPI.test_get_content_subtype_from_message_explicit�r�r;c�j�UOQ2oUOUO2Q2P!)r�r��r2r1r�rns& r8�9test_get_content_subtype_from_message_text_plain_implicit�HTestMessageAPI.test_get_content_subtype_from_message_text_plain_implicit��)���l�l�<�(������0�0�2�G�<r;c�j�UOQ2oUOUO2Q2P!)r�r�r�rns& r8�9test_get_content_subtype_from_message_text_plain_explicit�HTestMessageAPI.test_get_content_subtype_from_message_text_plain_explicit�r�r;c�f�[2oQUQ$UOUO2Q2P!)�no-slash-in-this-stringrDr�r�rns& r8�test_get_content_maintype_error�.TestMessageAPI.test_get_content_maintype_error�s,���i��7��N������1�1�3�V�<r;c�f�[2oQUQ$UOUO2Q2P!)r�rDr�r�rns& r8�test_get_content_subtype_error�-TestMessageAPI.test_get_content_subtype_error�s,���i��7��N������0�0�2�G�<r;c�|�UOo[2oUOQQ2UOQQ2UOQQ2UUO2,QN2UUO	2,QN2UOQQ2UUO2,QN2UUO	2,Q
N2UOQQ2UOQQ2UUO2,QN2UUO	2,QN2UO
[UO
Q	Q
2P!)�First�One�Second�Two�Third�Three�Twenty�Eleven�One Hundred�Fourth�Missing)r�r�r�)r�r�r�)r�r�r�)r�r�r�r�)r�r�r�r�)r1rr��keys�values�replace_headerr��KeyErrorr4s&  r8�test_replace_header�"TestMessageAPI.test_replace_header�s���
�
�
���i�����w��&����x��'����w��(�
�3�8�8�:�3�4�
�3�:�:�<�0�1����8�X�.�
�3�8�8�:�3�4�
�3�:�:�<�3�4����w��)����7�M�2�
�3�8�8�:�<�=�
�3�:�:�<�E�F����(�C�$6�$6��)�Lr;c��[2oUOUO22UOQQQQ5UO	UO2Q2UOQQ2UO	UO2Q2UOQQ2UO	UO2Q2P!)r�r�z
random.avir��inline�InlinE)r�assertIsNone�get_content_dispositionr�r1r�rns& r8�test_get_content_disposition�+TestMessageAPI.test_get_content_disposition�s����i�����#�5�5�7�8����,�l� ,�	�	.�����4�4�6��E����0�(�;�����4�4�6��A����0�(�;�����4�4�6��Ar;c��Qo[2oQUQ$QUQ$UOU2UOUOP	Q5Q2UO	UO
]*[O2P!)zAwDp0P7//y6LwKEAcPa/6Q=9zaudio/x-midir@rZrBr[s����.���p���)rrTr1r]�assertIsInstance�defectsr�InvalidBase64CharactersDefect�r5�xr7s&  r8�test_broken_base64_payload�)TestMessageAPI.test_broken_base64_payload�ss��&���i��,��N��+3��'�(��������������5�7�	9�	
���c�k�k�!�n�$�B�B�	Dr;c��Qo[2oQUQ$QUQ$UOU2UOUOP	Q5[	UQ22P!)uthis is a bröken thing to dor?r@rdrBr[zraw-unicode-escape)rrTr1r]rrs&  r8�test_broken_unicode_payload�*TestMessageAPI.test_broken_unicode_payload�sW��
.���i��*��N��+1��'�(��������������5��q�"6�7�	9r;c��QOQ2o[2oQUQ$QUQ$VmUOUO	P	Q5U2P!)u#this is a quéstionable thing to dorY�text/plain; charset="utf-8"r@rdrBr[)r�r�_payloadr1r]rs&  r8�test_questionable_bytes_payload�.TestMessageAPI.test_questionable_bytes_payload�sP��
2�8�8��A���i��;��N��+1��'�(�����������5�q�9r;c�v�[2oUOQQQQ5UOQUQ*2P!)r�r�r�r�zattachment; filename="bud.gif"�rr�r1rns& r8�test_ascii_add_header�$TestMessageAPI.test_ascii_add_header�s<���i�����,�l� )�	�	+����9��%�&�	(r;c�v�[2oUOQQQQ5UOQUQ*2P!)r�r��Fußballer.pptr�z/attachment; filename*=utf-8''Fu%C3%9Fballer.pptrrns& r8�test_noascii_add_header�&TestMessageAPI.test_noascii_add_header�s<���i�����,�l�%�	�	'����?��%�&�	(r;c�v�[2oUOQQQQ5UOQUQ*2P!)r�r�r�z1attachment; filename*=iso-8859-1''Fu%DFballer.ppt)r=r;rrrns& r8�#test_nonascii_add_header_via_triple�2TestMessageAPI.test_nonascii_add_header_via_triple�s<���i�����,�l�9�	�	;����A��%�&�	(r;c�v�[2oUOQQQQ5UOQUQ*2P!)r�r�zwindows [filename].pptr�z-attachment; filename="windows [filename].ppt"rrns& r8�#test_ascii_add_header_with_tspecial�2TestMessageAPI.test_ascii_add_header_with_tspecial�s<���i�����,�l�-�	�	/����;��%�&�	(r;c�v�[2oUOQQQQ5UOQUQ*2P!)r�r�uFußballer [filename].pptr�z@attachment; filename*=utf-8''Fu%C3%9Fballer%20%5Bfilename%5D.pptrrns& r8�&test_nonascii_add_header_with_tspecial�5TestMessageAPI.test_nonascii_add_header_with_tspecial�s<���i�����,�l�0�	�	2����N��%�&�	(r;c��,QNo[OO[OO1FDIo[O
[O1FD!oSFDvqEUOV#VE2J	J#	JK	P!)�Invalid Header))r*zcontains space)z
Tab	Headerzcontains tab)zColon:Headerzcontains colon)r;z
Empty name)z
 LeadingSpacezstarts with space)zTrailingSpace zends with space)zHeaderzNon-ASCII character)uHeader€zExtended ASCII)r�r��default�compat32r�__setitem__r��do_test_invalid_header_names)r5�invalid_headersr��setterrJr�s&     r8�test_invalid_header_names�(TestMessageAPI.test_invalid_header_namessj��	
���|�|�+�+�U�\�\�-B�-B�C�F�"�.�.��0B�0B�C��#2�K�D��5�5��t�4�$3�D�Dr;c	�h�UOVV4Q59^tt^2[UQ5oQoUO[U29^tt^2oUVSU2PPP2UO	U8[WO22PPP2P!)%fhKA9h)%fhP!9h))r�r0rJr�r�z'(?i)(?=.*invalid)(?=.*header)(?=.*name))r[rrsr�r�r��	exception)r5r�r0rJr�r\�pattern�cms&&&&&   r8r.�+TestMessageAPI.do_test_invalid_header_namess���
�\�\��T�\�
O�
O��V�,�G�@�G��'�'�
�G�<�<����u�-�=��M�M�T�H�s�2�<�<�'8�9�P�
O�=�<��P�
O�
O�s/�-B �

B
	�/B �
B
�B
�B � B1	�)B1	c���Q	FDYo[2oQU*UQ$QUQ$UOQ2UOUOP	Q5QQU*2J[	P!)
�latin-1�text/plain; charset=%sr@rCrBsfoo=e6=96=87barr[�	foo文bar�1get_payload returns wrong result with charset %s.�r9r�rm�r5rAr7s&  r8�test_binary_quopri_payload�)TestMessageAPI.test_binary_quopri_payloadsb��+�G��)�C�":�W�"D�C���/A�C�+�,��O�O�.�/�������t��,�%�C�g�M�
O�,r;c���Q	FDYo[2oQU*UQ$QUQ$UOQ2UOUOP	Q5QQU*2J[	P!)
r9r:r@rZrBsZm9v5paHYmFyr[r;r<r=rmr>s&  r8�test_binary_base64_payload�)TestMessageAPI.test_binary_base64_payload'sa��+�G��)�C�":�W�"D�C���/7�C�+�,��O�O�O�,�������t��,�%�C�g�M�
O�,r;c��QFDsoQFDio[2oQU*UQ$V#Q$UOQ2UOUOP	Q5Q[	Q	2OV22Jk	Ju	P!)
r9r:r@rBs begin 666 -
)9F]OYI:'8F%R
 
end
r[r;r=r�)z!get_payload returns wrong result z"with charset {0} and encoding {1}.)rrTr1r]r��format)r5rAr�r7s&   r8�test_binary_uuencode_payload�+TestMessageAPI.test_binary_uuencode_payload2sz��+�G�F���i��&>��&H��N�#�3;�/�0���� G�H�� � ��O�O�4�O�0�)��?�@���w�1�3�G�,r;c�v�[2oUOQQPQ5UOQUQ*2P!)r�r)�foo_barzinline; foo-barrrns& r8�$test_add_header_with_name_only_param�3TestMessageAPI.test_add_header_with_name_only_param@s3���i�����,�h���E����*�C�0E�,F�Gr;c�r�[2oUOQP2UOPUQ*2P!)zX-Statusrrns& r8�test_add_header_with_no_value�,TestMessageAPI.test_add_header_with_no_valueEs+���i�����z�4�(�����S��_�-r;c��[2o[Q2UQ$UO[OUO
2P!�zdummy
X-Injected-Header: test�Dummy)rr
r�rr�r�rns& r8�(test_embedded_header_via_Header_rejected�7TestMessageAPI.test_embedded_header_via_Header_rejectedLs2���i���>�?��G�����&�1�1�3�=�=�Ar;c�z�[2oQUQ$UO[OUO2P!rP)rr�rr�r�rns& r8�(test_embedded_header_via_string_rejected�7TestMessageAPI.test_embedded_header_via_string_rejectedQs,���i��7��G�����&�1�1�3�=�=�Ar;c��[Q2oQUQ$UO[U2[OQ22P!)zabc
uÉ test�Subjectz�            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Subject: =?utf-8?q?=C3=89_test?=

            abc
            �rr1r�r�r��r5r�s& r8�-test_unicode_header_defaults_to_utf8_encoding�<TestMessageAPI.test_unicode_header_defaults_to_utf8_encodingVs9���W��� ��)������Q�����1�!�	r;c�|�[Q2oUO[U2[OQ22P!)uÉ testabc
z�            Content-Type: text/plain; charset="utf-8"
            MIME-Version: 1.0
            Content-Transfer-Encoding: base64

            w4kgdGVzdGFiYwo=
            rYrZs& r8�+test_unicode_body_defaults_to_utf8_encoding�:TestMessageAPI.test_unicode_body_defaults_to_utf8_encodingcs0���^�$������Q�����1�!�	r;c��[O[OQ2[OO
Q5oUO
UOP	Q5Q2UOUQ*O,2P!)zP        Content-Transfer-Encoding: base64

        SGVsbG8uIFRlc3Rpbmc=
        r�r[�Hello. TestingrB�
r�rr�r�r�r+r1r]�assertDefectsEqualr
rns& r8�#test_string_payload_with_base64_cte�2TestMessageAPI.test_string_payload_with_base64_ctensk���'�'����9�)
��\�\�)�)�	+��
	
��������5�7H�I�����$?� @� H� H�"�Mr;�)b�__name__�
__module__�__qualname__�__firstlineno__r9rLrQrUr`rfrirorwrr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrrr"r'r+r/r=rBrGrKrPrSrcrirrr~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�rrrrrrr!r$r'r1r.r?rBrFrJrMrRrUr[r^rd�__static_attributes__�__classdictcell__��
__classdict__s@r8r-r-:s�����,�A�4B�H�:�=�=�0�
4�;�"	5�.�+�8�,C�
2�	2�@�,	1�9��
!�3�1�4�,
4�4�6�1�3�2�.�3�1�
3�:�"J�
;�$M�
0�A�+�*)�F�"'�"C�9�
?�	A�L�?�C�
+�
+�
?�?�=�@�
O�O�=�=�=�>�
M�M�=�=�=�
=�
M�"	B�
D�	9�:�(�(�(�(�(�4�":�	O�	O�3�H�
.�B�
B�
�	�N�Nr;r-c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�TestEncoders�zc��[QQ29^tt^2oUO2oPPP2[OOOW2oUO
2oUOQ2oSO[STt,tFDo[U2MJ	to2]L2P!)%fhK�9httoh)�
python.gif�rbr*)r'r�r��mime�imagerr]r��assertLessEqual�maxr^)r5r��bindata�mimed�base64edr�r
s&      r8�test_EncodersEncode_base64�'TestEncoders.test_EncodersEncode_base64|s���
�l�D�
)�
)�R��g�g�i�G�*��
�
� � �*�*�7�3���$�$�&�����t�$�����S�5�!:�5�a�3�q�6�5�!:�;�R�@�
*�
)��";s�B0�C�0C	�9C	c�v�UOo[2oUOQ2UUQ*Q2P!)rOrB�7bit)r1rrGr4s&  r8�test_encode_empty_payload�&TestEncoders.test_encode_empty_payload�s0��
�
�
���i�����
�#�
�3�*�+�V�4r;c���UOo[Q2oUUQ*Q2[Q2oUUQ*Q2[QQQ5oUUQ*Q2P!)�hello worldrBruhello ø worldrZr=��_charsetrC)r1rr4s&  r8�test_default_cte�TestEncoders.test_default_cte�s`��
�
�
���}�%��
�3�*�+�V�4��)�*��
�3�*�+�X�6��)�L�A��
�3�*�+�-?�@r;c��UOo[QQQ5oUUQ*Q2UUO2[OQ22P!)u文
�euc-jpr�rBrz�            MIME-Version: 1.0
            Content-Type: text/plain; charset="iso-2022-jp"
            Content-Transfer-Encoding: 7bit

            $BJ8(B
            )r1rr�r�r�r4s&  r8�test_encode7or8bit�TestEncoders.test_encode7or8bit�sK���
�
���w��2��
�3�*�+�V�4�
�3�=�=�?�H�O�O�-��	r;c��[QQQ2oUO[U2[OQ22P!)uáö
r�z
ISO-8859-1z�            MIME-Version: 1.0
            Content-Type: text/text; charset="iso-8859-1"
            Content-Transfer-Encoding: quoted-printable

            =E1=F6
            rYrns& r8�test_qp_encode_latin1�"TestEncoders.test_qp_encode_latin1�s4���|�V�\�:������S��8�?�?�4�$�	r;c��[QQQ2oUO[U2[OQ22P!)uż
r�z
ISO-8859-2z�            MIME-Version: 1.0
            Content-Type: text/text; charset="iso-8859-2"
            Content-Transfer-Encoding: quoted-printable

            =BF
            rYrns& r8�test_qp_encode_non_latin1�&TestEncoders.test_qp_encode_non_latin1�s4���z�6�<�8������S��8�?�?�4�$�	r;rf)rgrhrirjr|r�r�r�r�r�rkrlrms@r8rprpzs*����A�5�
A�
��	�	r;rpc�`�\sQsQsnPsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Q s#Q!s$Q"s%Q#s&Q$s'Q%s(Q&s)Q's*Q(s+Q)s,Us-P!)*�TestLongHeaders�c���UOo[OQ2o[2o[	U2oUOU2UUO
2Q2P!)z�Subject: bug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more text

test
)�ndiffAssertEqualr�rrr
r�r��r5r6r7�sfpr�s&    r8�test_split_long_continuation�,TestLongHeaders.test_split_long_continuation�sT��
�
"�
"���'�'�)����j���c�N��	�	�	�#��
�3�<�<�>��	r;c���UOoQo[UQQ5oUUO2Q2[UOQQ22oUUO2Q2P!)z�bug demonstration
	12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
	more text�	��continuation_wsr+z�bug demonstration
 12345678911234567892123456789312345678941234567895123456789612345678971234567898112345678911234567892123456789112345678911234567892123456789
 more text)r�r
r�r�r5r6�hstr�hs&   r8�,test_another_long_almost_unsplittable_header�<TestLongHeaders.test_another_long_almost_unsplittable_header�sc��
�
"�
"����
�4��.��
�1�8�8�:��	�
�4�<�<��c�*�+��
�1�8�8�:��	r;c��UOo[Q2o[Q2o[Q2oQoQoQo[VRQQ5oUOVc2UOVt2[	2o	V�Q$[2o
[
U
2oUOU	2UU
O2Q2UUO]LQ	5Q
2P!)r=r{rY�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.」と言っています。rX��header_namea!Subject: =?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerderb?=
 =?iso-8859-1?q?and_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndischen?=
 =?iso-8859-1?q?_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Klingen_bef?=
 =?iso-8859-1?q?=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se_hrouti?=
 =?iso-8859-2?q?ly_pod_tlakem_jejich_d=F9vtipu=2E=2E_?= =?utf-8?b?5q2j56K6?=
 =?utf-8?b?44Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb44KT44CC5LiA?=
 =?utf-8?b?6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go44Gv44Gn44Gf44KJ?=
 =?utf-8?b?44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBpc3QgZGFzIE51bnN0dWNr?=
 =?utf-8?b?IGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWloZXJodW5kIGRhcyBPZGVyIGRp?=
 =?utf-8?b?ZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI3jgajoqIDjgaPjgabjgYTjgb7jgZk=?=
 =?utf-8?b?44CC?=

��
maxlinelena	=?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerde?=
 =?iso-8859-1?q?rband_komfortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndis?=
 =?iso-8859-1?q?chen_Wandgem=E4lden_vorbei=2C_gegen_die_rotierenden_Klinge?=
 =?iso-8859-1?q?n_bef=F6rdert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se?=
 =?iso-8859-2?q?_hroutily_pod_tlakem_jejich_d=F9vtipu=2E=2E_?=
 =?utf-8?b?5q2j56K644Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb?=
 =?utf-8?b?44KT44CC5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go?=
 =?utf-8?b?44Gv44Gn44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBp?=
 =?utf-8?b?c3QgZGFzIE51bnN0dWNrIGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWlo?=
 =?utf-8?b?ZXJodW5kIGRhcyBPZGVyIGRpZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI0=?=
 =?utf-8?b?44Go6KiA44Gj44Gm44GE44G+44GZ44CC?=)
r�r	r
�appendrrr
r�r�r�)r5r6r��cz�utf8�g_head�cz_head�	utf8_headr�r7r�s&          r8�test_long_nonstring�#TestLongHeaders.test_long_nonstring�s���
�
"�
"���L�!��
�\�
"���w���$��$��0�	�
�6�)�4��	�����	����!��i���I���j���c�N��	�	�	�#��
�3�<�<�>�
�
	�	�1�8�8�r�8�"�%1�	2r;c�h�UOo[QQQ5oUUO2Q2P!)�iwasnipoop; giraffes="very-long-necked-animals"; spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"�X-Foobar-Spoink-Defrobnitr��jwasnipoop; giraffes="very-long-necked-animals";
 spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"�r�r
r��r5r6r�s&  r8�test_long_header_encode�'TestLongHeaders.test_long_header_encodes7��
�
"�
"���O�:�
<��	�1�8�8�:�>�	?r;c�j�UOo[QQQQ5oUUO2Q2P!)r�r�r��r�r�r�r�r�s&  r8�<test_long_header_encode_with_tab_continuation_is_just_a_hint�LTestLongHeaders.test_long_header_encode_with_tab_continuation_is_just_a_hint%s:��
�
"�
"���O�:�#'�
)��	�1�8�8�:�>�	?r;c�j�UOo[QQQQ5oUUO2Q2P!)ziwasnipoop; giraffes="very-long-necked-animals";	spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"r�r�r�zjwasnipoop; giraffes="very-long-necked-animals";
	spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"r�r�s&  r8�-test_long_header_encode_with_tab_continuation�=TestLongHeaders.test_long_header_encode_with_tab_continuation/s;��
�
"�
"���O�:�#'�
)��	�1�8�8�:�?�	@r;c�`�[QQ2oUOUO2Q2P!)�文r��=?iso-2022-jp?b?GyRCSjgbKEI=?=�r
r1r��r5r�s& r8�0test_header_encode_with_different_output_charset�@TestLongHeaders.test_header_encode_with_different_output_charset9s%���5�(�#���������%E�Fr;c��[QOQ2Q2oQoUOUO2U2P!)s6test-ja ����Ƥ��줿�᡼��ϻʲ�Ԥξ�ǧ���ԤäƤ��ޤ�r�z�=?iso-2022-jp?b?dGVzdC1qYSAbJEIkWEVqOUYkNSRsJD8lYSE8JWskTztKMnE8VCROPjUbKEI=?=
 =?iso-2022-jp?b?GyRCRyckckJUJEMkRiQkJF4kORsoQg==?=)r
r\r1r�)r5r�ras&  r8�5test_long_header_encode_with_different_output_charset�ETestLongHeaders.test_long_header_encode_with_different_output_charset=s?���$�%+�F�8�$4�h�
@��7��	
�������S�)r;c��UOo[P2oQUQ$[2o[U2oUO	U2UUO2Q2P!)r;r�r�z�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"

)r�rrr
r�r�r�s&    r8�test_header_splitter�$TestLongHeaders.test_header_splitterGsY��
�
"�
"���r�l��
H�	�'�(��j���c�N��	�	�	�#��
�3�<�<�>��	r;c�(�UOo[2oQUQ$[OQ[	]
222UQ$UOQ2[
2o[U2oUOU2UUO2Q2P!)�test@dom.ainr�c3�@�SF �DoQU*w�	J	P!3h)z<%d@dom.ain>rf)�.0�is& r8�	<genexpr>�@TestLongHeaders.test_no_semis_header_splitter.<locals>.<genexpr>_s��9���9�a�~��'9�'9�9�s��
References�Testz�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)
r�r�SPACEr��rangerTrr
r�r�r�s&    r8�test_no_semis_header_splitter�-TestLongHeaders.test_no_semis_header_splitter[sv��
�
"�
"���i��$��F��!�J�J�&M�5��9�&M�M��L��������j���c�N��	�	�	�#��
�3�<�<�>��		r;c�d�UOo[Q2oUUO2Q2P!)z�Subject: the first part of this is short, but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfz�Subject: the first part of this is short,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfr�r�s&  r8�"test_last_split_chunk_does_not_fit�2TestLongHeaders.test_last_split_chunk_does_not_fitk�5��
�
"�
"����
��	�1�8�8�:�b�	cr;c�d�UOo[Q2oUUO2Q2P!)z_, but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfz`,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfr�r�s&  r8�>test_splittable_leading_char_followed_by_overlong_unsplittable�NTestLongHeaders.test_splittable_leading_char_followed_by_overlong_unsplittabletr�r;c�d�UOo[Q2oUUO2Q2P!)za, , but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfzb, ,
 but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itselfr�r�s&  r8�Gtest_multiple_splittable_leading_char_followed_by_overlong_unsplittable�WTestLongHeaders.test_multiple_splittable_leading_char_followed_by_overlong_unsplittable}r�r;c�d�UOo[Q2oUUO2Q2P!)zTthis_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;r�r�s&  r8�1test_trailing_splittable_on_overlong_unsplittable�ATestLongHeaders.test_trailing_splittable_on_overlong_unsplittable�s1��
�
"�
"���*�
+��
�1�8�8�:�*�	+r;c�d�UOo[Q2oUUO2Q2P!)zW; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; zX;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; r�r�s&  r8�Itest_trailing_splittable_on_overlong_unsplittable_with_leading_splittable�YTestLongHeaders.test_trailing_splittable_on_overlong_unsplittable_with_leading_splittable�s5��
�
"�
"���+�
,��	�1�8�8�:�Z�	[r;c�d�UOo[Q2oUUO2Q2P!)zpThis is a long line that has two whitespaces  in a row.  This used to cause truncation of the header when foldedzqThis is a long line that has two whitespaces  in a row.  This used to cause
 truncation of the header when foldedr�r�s&  r8�5test_long_header_with_multiple_sequential_split_chars�ETestLongHeaders.test_long_header_with_multiple_sequential_split_chars�s3��
�
"�
"���F�
G��
�1�8�8�:�)�	*r;c�d�UOo[Q2oUUO2Q2P!)�Kthisverylongheaderhas;semicolons;and,commas,butthey;arenotlegal;fold,pointsr�r�s&  r8�:test_splitter_split_on_punctuation_only_if_fws_with_header�JTestLongHeaders.test_splitter_split_on_punctuation_only_if_fws_with_header�s1��
�
"�
"���+�
,��
�1�8�8�:�2�	3r;c�d�UOo[Q2oUUO2Q2P!)z�this is a  test where we need to have more than one line before; our final line that is just too big to fit;; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;z�this is a  test where we need to have more than one line before;
 our final line that is just too big to fit;;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;r�r�s&  r8�Dtest_leading_splittable_in_the_middle_just_before_overlong_last_part�TTestLongHeaders.test_leading_splittable_in_the_middle_just_before_overlong_last_part�s5��
�
"�
"���*�
+��	�1�8�8�:�Y�	Zr;c�d�UOo[Q2oUUO2Q2P!)zTthis_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself r�r�s&  r8�/test_overlong_last_part_followed_by_split_point�?TestLongHeaders.test_overlong_last_part_followed_by_split_point�s1��
�
"�
"���*�
+��
�1�8�8�:�=�	>r;c�d�UOo[Q2oUUO2Q2P!)z�this_is_a__test_where_we_need_to_have_more_than_one_line_before_our_final_line_; ; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; z�this_is_a__test_where_we_need_to_have_more_than_one_line_before_our_final_line_;
 ;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; r�r�s&  r8�@test_multiline_with_overlong_parts_separated_by_two_split_points�PTestLongHeaders.test_multiline_with_overlong_parts_separated_by_two_split_points��5��
�
"�
"���+�
,��	�1�8�8�:�Z�	[r;c�d�UOo[Q2oUUO2Q2P!)z�this is a test where we need to have more than one line before our final line; ; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; z�this is a test where we need to have more than one line before our final line;
 ;
 this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself; r�r�s&  r8�>test_multiline_with_overlong_last_part_followed_by_split_point�NTestLongHeaders.test_multiline_with_overlong_last_part_followed_by_split_point�r�r;c��UOo[2oQUQ$[OQ,]
*2UQ$UO	Q2[2o[
U2oUOU2UUO2Q2P!)r�r�z<foo@dom.ain>  r�r�z�From: test@dom.ain
References: <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>
   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>   <foo@dom.ain>
   <foo@dom.ain>   <foo@dom.ain>  

Test�	r�rr�r�rTrr
r�r�r�s&    r8�%test_long_header_with_whitespace_runs�5TestLongHeaders.test_long_header_with_whitespace_runs�su��
�
"�
"���i��$��F��!�J�J�(9�':�R�'?�@��L��������j���c�N��	�	�	�#��
�3�<�<�>��		r;c�(�UOo[2oQUQ$[OQ,]
*2Q*UQ$UO	Q2[2o[
U2oUOU2UUO2Q2P!)r�r�z
<foo@dom.ain>z; abcr�r�z�From: test@dom.ain
References: <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain>
 <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain> <foo@dom.ain>
 <foo@dom.ain>; abc

Testrr�s&    r8�'test_long_run_with_semi_header_splitter�7TestLongHeaders.test_long_run_with_semi_header_splitter�sy��
�
"�
"���i��$��F��!�J�J��'8�2�'=�>��H��L��������j���c�N��	�	�	�#��
�3�<�<�>��		r;c���UOo[2oQUQ$QUQ$UOQ2[2o[	U2oUOU2UUO
2Q2P!)r�r�r�r�r�zrFrom: test@dom.ain
References: 
 thisverylongheaderhas;semicolons;and,commas,butthey;arenotlegal;fold,points

Test)r�rrTrr
r�r�r�s&    r8�.test_splitter_split_on_punctuation_only_if_fws�>TestLongHeaders.test_splitter_split_on_punctuation_only_if_fws�se��
�
"�
"���i��$��F��+��L��������j���c�N��	�	�	�#��
�3�<�<�>��		r;c��UOoQo[U2oUUO2Q2[Q2oUUO2Q2P!)zReferences: z]References:
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx�Pxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz\References: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr�r�s&   r8�test_no_split_long_header�)TestLongHeaders.test_no_split_long_headersQ��
�
"�
"��(���4�L��	�1�8�8�:�U�	V�
�8���
�1�8�8�:�i�jr;c�l�UOoQo[UQQ5oUUO2Q2P!)aWfrom babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
r�r�a_from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)
	from babylon.socal-raves.org (localhost [127.0.0.1]);
 by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
 for <mailman-admin@babylon.socal-raves.org>;
 Sat, 2 Feb 2002 17:00:06 -0800 (PST)r�r�s&   r8�"test_splitting_multiple_long_lines�2TestLongHeaders.test_splitting_multiple_long_lines
s7��
�
"�
"����

�4��.��
�1�8�8�:�)�	*r;c�p�UOoQo[U]NQQQ5oUUO2Q2P!)z�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�Receivedr�)r�r�r�z�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 -0400r�r�s&   r8�&test_splitting_first_line_only_is_long�6TestLongHeaders.test_splitting_first_line_only_is_long#sA��
�
"�
"��A��

�4�B�J�#'�
)��
�1�8�8�:�A�	Br;c��UOo[2o[QQQQ5oUOQ2UUO	]LQ5Q2V2Q$UUO]LQ5Q2UUO]Q5Q	2P!)
zBritische Regierung gibtr=rXr�u-grünes Licht für Offshore-Windkraftprojekter�zl=?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offs?=
 =?iso-8859-1?q?hore-Windkraftprojekte?=��maxheaderlenzwSubject: =?iso-8859-1?q?Britische_Regierung_gibt_gr=FCnes_Licht_f=FCr_Offs?=
 =?iso-8859-1?q?hore-Windkraftprojekte?=

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

)r�rr
r�r�r�)r5r6r7r�s&   r8�test_long_8bit_header�%TestLongHeaders.test_long_8bit_header3s���
�
"�
"���i���-�|� )�
+��	���D�E�
�1�8�8�r�8�"�%,�	-��I��
�3�=�=�b�=�)�,�	�
	�3�=�=�a�=�(�+�	r;c���UOo[2oQoV2Q$UUO]NQ5Q2[2o[UQQ5UQ$UUO]NQ5Q2P!)uhBritische Regierung gibt grünes Licht für Offshore-Windkraftprojekte <a-very-long-address@example.com>zReply-Torz�Reply-To: =?utf-8?q?Britische_Regierung_gibt_gr=C3=BCnes_Licht_f=C3=BCr_Offs?=
 =?utf-8?q?hore-Windkraftprojekte_=3Ca-very-long-address=40example=2Ecom=3E?=

r�)r�rr�r
)r5r6r7�
header_strings&   r8� test_long_8bit_header_no_charset�0TestLongHeaders.test_long_8bit_header_no_charsetGst��
�
"�
"���i��=�
�(�J��
�3�=�=�b�=�)�,�	�
�i�� ��-7�9��J��
�3�=�=�b�=�)�,�	r;c�r�UOoQo[2oV#Q$UUO]NQ5Q2P!)z�"Someone Test #A" <someone@eecs.umich.edu>,<someone@eecs.umich.edu>, "Someone Test #B" <someone@umich.edu>, "Someone Test #C" <someone@eecs.umich.edu>, "Someone Test #D" <someone@eecs.umich.edu>r�rz�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>

)r�rr�)r5r6r�r7s&   r8�test_long_to_header�#TestLongHeaders.test_long_to_header\s>��
�
"�
"��;��
�i���D�	�
�3�=�=�b�=�)�,�	r;c��UOoQo[U2oUOQ2UUO]LQ5Q2P!)zIThis is an example of string which has almost the limit of header length.zAdd another line.r�z\This is an example of string which has almost the limit of header length.
 Add another line.�r�r
r�r��r5r6r�r�s&   r8�test_long_line_after_append�+TestLongHeaders.test_long_line_after_appendmsB��
�
"�
"��W���1�I��	���$�%�
�1�8�8�r�8�"�%�	r;c��UOoQo[U2oUOQ2UUO2Q2P!)zThis is a shorter line.z!Add another sentence. (Surprise?)z9This is a shorter line. Add another sentence. (Surprise?)r#r$s&   r8�test_shorter_line_with_append�-TestLongHeaders.test_shorter_line_with_appendvs<��
�
"�
"��%���1�I��	���4�5�
�1�8�8�:�F�	Hr;c�v�UOoQoQo[UQUQ5oUUO]LQ5Q2P!)z!X-Very-Very-Very-Long-Header-Nameu�Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an südlündischen Wandgemälden vorbei, gegen die rotierenden Klingen befördert. r=r�r�a=?iso-8859-1?q?Die_Mieter_treten_hier_e?=
 =?iso-8859-1?q?in_werden_mit_einem_Foerderband_komfortabel_den_Korridor_e?=
 =?iso-8859-1?q?ntlang=2C_an_s=FCdl=FCndischen_Wandgem=E4lden_vorbei=2C_ge?=
 =?iso-8859-1?q?gen_die_rotierenden_Klingen_bef=F6rdert=2E_?=r�)r5r6�fn�gsr�s&    r8�test_long_field_name�$TestLongHeaders.test_long_field_name~sE��
�
"�
"��
0����
�2�|��4��
�1�8�8�r�8�"�%A�	Br;c��Qo[2o[UQQ5UQ$VQ$UOUO]NQ5Q2P!)z�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�r��
Received-1�
Received-2ra1Received-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

�rr
r�r��r5r�r7s&  r8�test_long_received_header�)TestLongHeaders.test_long_received_header�sK��/���i��"�1�d�;��L���L�����c�m�m��m�<�?�	r;c��Qo[2o[UQQQ5UQ$VQ$UOUO]NQ5Q2P!)z�<15975.17901.207240.414604@sgigritzmann1.mathematik.tu-muenchen.de> (David Bremner's message of "Thu, 6 Mar 2003 13:58:21 +0100")r0r�r�r1ra#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")

r2r3s&  r8�test_string_headerinst_eq�)TestLongHeaders.test_string_headerinst_eq�sP��1���i��"�1�,�37�9��L���L�����c�m�m��m�<�?�	r;c��UOo[2oQoV2Q$[UQQ5UQ$QU*UQ$UUO]NQ5Q2P!)z�iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzpzFace-1zFace-2r�r+zFace-3ra�Face-1: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp
Face-2: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp
Face-3: 
 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUAAAAkHiJeRUIcGBi9
 locQDQ4zJykFBAXJfWDjAAACYUlEQVR4nF2TQY/jIAyFc6lydlG5x8Nyp1Y69wj1PN2I5gzp

�r�rr
r�)r5r6r7�ts&   r8�-test_long_unbreakable_lines_with_continuation�=TestLongHeaders.test_long_unbreakable_lines_with_continuation�s^��
�
"�
"���i��
M���H�
��q�h�7��H�
��a���H�
�	�3�=�=�b�=�)�,�	r;c��UOoQo[OU2oUUO]NQ5Q2P!)z�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 -0700rz�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

)r�r�rr��r5r6r�r7s&   r8�"test_another_long_multiline_header�2TestLongHeaders.test_another_long_multiline_header�s@��
�
"�
"��/���'�'��*��
�3�=�=�b�=�)�,�	r;c��UOoQo[2oV#Q$[UQQ5UQ$UUO]NQ5Q2P!)z�List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>�Listr�ra_List: List-Unsubscribe:
 <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>
List: List-Unsubscribe:
 <http://lists.sourceforge.net/lists/listinfo/spamassassin-talk>,
        <mailto:spamassassin-talk-request@lists.sourceforge.net?subject=unsubscribe>

r:)r5r6r�r7s&   r8�%test_long_lines_with_different_header�5TestLongHeaders.test_long_lines_with_different_header�sN��
�
"�
"��%���i���F���Q�F�3��F��
�3�=�=�b�=�)�,�	r;c���[[OQ2QQQ5oUOUO	2Q*[OQ2Q*2P!)z�            We're going to pretend this header is in a non-ascii character set
            	to see if line wrapping with encoded words and embedded
               folding white space worksrYr�)rAr�r*z�            =?utf-8?q?We=27re_going_to_pretend_this_header_is_in_a_non-ascii_chara?=
             =?utf-8?q?cter_set?=
             =?utf-8?q?_to_see_if_line_wrapping_with_encoded_words_and_embedded?=
             =?utf-8?q?_folding_white_space_works?=)r
r�r�r1r�r�s& r8�*test_long_rfc2047_header_with_embedded_fws�:TestLongHeaders.test_long_rfc2047_header_with_embedded_fws�sZ���8�?�?�$,�-�#�%�
'��	
�������D��(�/�/�;7�+8�9=�	+=�	>r;rf).rgrhrirj�maxDiffr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr	r
rrrrr r%r(r-r4r7r<r@rDrGrkrlrms@r8r�r��s������G��(�"42�l?�?�@�G�*��(	� c�c�c�+�[�*�3�	Z�>�	[�	[�	�"	�"	�$
k�*�,B� �(�*�"�H�
B��$�&�0��&>�>r;r�c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�TestFromManglingi�c�z�[2UmQUOQ$UOOQ2P!)zaaa@bbb.orgr�z(From the desk of A.A.A.:
Blah blah blah
)rr7rT�r5s&r8�setUp�TestFromMangling.setUp�s0���9���(������������	r;c��[2o[UP	Q5oUOUO2UO	UO2Q2P!)T��mangle_from_z<From: aaa@bbb.org

>From the desk of A.A.A.:
Blah blah blah
�rr
r�r7r1r��r5r�r�s&  r8�test_mangled_from�"TestFromMangling.test_mangled_froms@���J���a�d�+��	�	�	�$�(�(���������(�	r;c��[2o[UP
Q5oUOUO2UO	UO2Q2P!)FrQz;From: aaa@bbb.org

From the desk of A.A.A.:
Blah blah blah
rSrTs&  r8�test_dont_mangle_from�&TestFromMangling.test_dont_mangle_froms@���J���a�e�,��	�	�	�$�(�(���������(�	r;c�z�[2o[UP	Q5o[O[O
Q22oUO
U2SO[UO2OQ2Tt,tFDoUOQ2%fJ]MJ 	to2]2P!ttoh)TrQa)            From: foo@bar.com
            Mime-Version: 1.0
            Content-Type: multipart/mixed; boundary=XXX

            From somewhere unknown

            --XXX
            Content-Type: text/plain

            foo

            --XXX--

            From somewhere unknowable
            r*z>From )rr
r�rr�r�r�r1r^r�r��
startswith)r5r�r�r7r
s&    r8�'test_mangle_from_in_preamble_and_epilog�8TestFromMangling.test_mangle_from_in_preamble_and_epilogs����J���a�d�+���'�'����9�)��� 	
�	�	�#����������);�);�D�)A�=�)A�A�%&�\�\�(�%;� �a�)A�=�>�?@�	B��=s�B8�$B8c�*�[OQ2OQ2o[OUQ*2o[2o[
UP	Q5oUOU2UOUO2UQ*2P!)z�            Content-Type: text/plain; charset="utf-8"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 8bit
            From: aaa@bbb.org

        rYsFrom Rölli
rQs
>From Rölli
)
r�r�r�r�r�rrr�r1r�)r5rr7�br�s&    r8� test_mangled_from_with_bad_bytes�1TestFromMangling.test_mangled_from_with_bad_bytes0su�����"�
��V�G�_�
	��&�&�v�0F�'F�G���I���1�4�0��	�	�	�#���������v�0G�'G�Hr;c�~�[OQ2OQ2o[OU2oP!)u�            From: aperson@example.com
            Content-Type: multipart/mixed; boundary="1"
            Content-Transfer-Encoding: È
        rY)r�r�r�r�r�)r5rr7s&  r8�$test_multipart_with_bad_bytes_in_cte�5TestFromMangling.test_multipart_with_bad_bytes_in_cte>s5�����"�
��V�G�_�		�
�&�&�v�.�r;)r7)rgrhrirjrNrUrXr\r`rcrkrlrms@r8rKrK�s*�����	�	�B�.I�/�/r;rKc�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�
TestMIMEAudioiIc���[QU0Q29^tt^2oUO2UmPPP2[UO2UmP!)%fhK,9h)zsndhdr.rt)r'r��
_audiodatar�_au�r5�extr�s&& r8�_make_audio�TestMIMEAudio._make_audioJsB��
���u�o�t�
,�
,�� �g�g�i�D�O�-��T�_�_�-���-�
,���A�A#	�A#	c���QQQQQQQQ-O2FDKvqUOU2UeSLSoUOUOO	2QU02JM	P!)�aifczx-aiff�aiff�wavzx-wav�au�basiczaudio/)r�rlr1rirH�r5rk�subtypes&  r8�test_guess_minor_type�#TestMIMEAudio.test_guess_minor_typeOsq���H��H��7��'�	
�
�%�'��L�C�
���S�!�$�_�c�'�G����T�X�X�6�6�8�F�7�)�:L�M�r;c���UOQ2UOO2oUO[O
[
UQ22UO2P!)rsr�)rlrir]r1rZ�decodebytesrrh�r5�payloads& r8�
test_encoding�TestMIMEAudio.test_encodingZsK��������(�(�&�&�(������+�+�E�'�7�,C�D����	*r;c��UOQ2[UOQ2oUOUO	2Q2P!)rs�fishz
audio/fish)rlrrhr1rH)r5rss& r8�test_checkSetMinor� TestMIMEAudio.test_checkSetMinor`s9�������
�t����
/������,�,�.��=r;c��UOQ2UOoUOOQQQQ5UUOQ*Q2UUOO	QQ5QQ
,2UUOOQQQ5Q2,oUUOOQQQ5P2UO
UOOQ	UQQ
5U2UO
UOOQU2U2UO
UOOQUQQ5U2P!)rsr�r��	sndhdr.aur�r�z attachment; filename="sndhdr.au"r4rr���failobjr�r��r�r;)rr�)rlr1rir�r<rI�assertIs�r5r6�missings&  r8�test_add_header�TestMIMEAudio.test_add_headeres8�������
�
�
�������1�<�%0�	�	2�
�4�8�8�)�*�-�	/�
�4�8�8���&;��<�� 9�:�	<�
�4�8�8���j�1F��G��	���
�4�8�8���l�3H��I�2�N��
�
�d�h�h�(�(��7�(�)�*�+2�	4�	
�
�
�d�h�h�(�(��7�;�W�E��
�
�d�h�h�(�(��w�08�)�:�;B�	Dr;)rirh)rgrhrirjrlrwr}r�r�rkrlrms@r8rfrfIs&����.�
	N�*�>�
D�Dr;rfc�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�
TestMIMEImagei}c���[QU0Q29^tt^2oUO2UmPPP2[UO2UmP!)%fhK,9h)zpython.rt)r'r��_imgdatar�_imrjs&& r8�_make_image�TestMIMEImage._make_image~sB��
���u�o�t�
,�
,���G�G�I�D�M�-��T�]�]�+���-�
,�rnc��QPQPQPQQQPQPQPQPQ	Q
QQQ
PQPQP-
O2FDKvqUOU2UeSLSoUOUOO	2QU02JM	P!)�bmp�exr�gif�jpg�jpeg�pbm�pgm�png�ppm�ras�rast�sgi�rgb�tiff�webp�xbmzimage/)r�r�r1r�rHrus&  r8rw�#TestMIMEImage.test_guess_minor_type�s����4��4��4��6��4��4��4��4��6��5��D��D��4�
��%�'��L�C�
���S�!�$�_�c�'�G����T�X�X�6�6�8�F�7�)�:L�M�#r;c���UOQ2UOO2oUO[O
[
UQ22UO2P!)r�r�)r�r�r]r1rZrzrr�r{s& r8r}�TestMIMEImage.test_encoding�sK��������(�(�&�&�(������+�+�E�'�7�,C�D����	(r;c��UOQ2[UOQ2oUOUO	2Q2P!)r�r�z
image/fish)r�rr�r1rH)r5�ims& r8r�� TestMIMEImage.test_checkSetMinor�s9�������
�t�}�}�f�
-������,�,�.��=r;c��UOQ2UOoUOOQQQQ5UUOQ*Q2UUOO	QQ5QQ
,2UUOOQQQ5Q2,oUUOOQQQ5P2UO
UOOQ	UQQ
5U2UO
UOOQU2U2UO
UOOQUQQ5U2P!)r�r�r�r�r�r�z%attachment; filename="dingusfish.gif"r4rr�r�r�r�)rr�)r�r1r�r�r<rIr�r�s&  r8r��TestMIMEImage.test_add_header�s:�������
�
�
�������1�<�%5�	�	7�
�4�8�8�)�*�2�	4�
�4�8�8���&;��<�� >�?�	A�
�4�8�8���j�1F��G��	���
�4�8�8���l�3H��I�2�N��
�
�d�h�h�(�(���0E�)�G�HO�	Q�	
�
�
�d�h�h�(�(��7�;�W�E��
�
�d�h�h�(�(��w�08�)�:�;B�	Dr;)r�r�)rgrhrirjr�rwr}r�r�rkrlrms@r8r�r�}s&����,�
N�((�>�
D�Dr;r�c�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�TestMIMEApplicationi�c��UOo[Q2oUUO2Q2UUQ*Q2P!)�������r�rBrZ)r1rrHr4s&  r8�test_headers� TestMIMEApplication.test_headers�s<��
�
�
���9�:��
�3���!�#=�>�
�3�*�+�X�6r;c��UOoQo[U2oUUO2O2Q2UUOP	Q5U2P!)r�z+vv8/f7/r[)r1rr]�strip)r5r6�	bytesdatar7s&   r8�	test_body�TestMIMEApplication.test_body�sK��
�
�
��/�	��i�(��
�3�?�?��"�"�$�j�1�
�3�?�?�$�?�'��3r;c��Qo[U[OQ5oUOUO	2Q[U2*2UOUO	P	Q5U2UOUQ*Q2[
2o[U2oUOU2UO2o[OU2oUOUO	2Q[U2*2UOUO	P	Q5U2UOUQ*Q2P!)r���_encoder��r[rErd)rr�encode_7or8bitr1r]r^rrr�r�r�r��r5r�r7r�r��wireform�msg2s&      r8�$test_binary_body_with_encode_7or8bit�8TestMIMEApplication.test_binary_body_with_encode_7or8bit�s���/�	��i�(�2I�2I�J��������*�H�s�9�~�,E�F���������5�y�A�����8�9�6�B��I���1���	�	�	�#���:�:�<���'�'��1��������*�H�s�9�~�,E�F�����)�)��)�6�	�B�����9�:�F�Cr;c�"�Qo[U[OQ5oUOUO	2Q[U2*2UOUO	P	Q5U2[
2o[U2oUOU2UO2o[OU2oUOUO	2Q[U2*2UOUO	P	Q5U2P!)r�r�r�r[)rr�encode_noopr1r]r^rrr�r�r�r�r�s&      r8�!test_binary_body_with_encode_noop�5TestMIMEApplication.test_binary_body_with_encode_noop�s���0�	��i�(�2F�2F�G��������*�H�s�9�~�,E�F���������5�y�A��I���1���	�	�	�#���:�:�<���'�'��1��������*�H�s�9�~�,E�F�����)�)��)�6�	�Br;c�b�Qo[U[OQ5oUOUO	P	Q5U2[2o[
U2oUOU2UO2o[OU2oUOUO	P	Q5U2P!)s������r�r[)rrr�r1r]rrr�r�r�r�r�s&      r8�0test_binary_body_with_unicode_linend_encode_noop�DTestMIMEApplication.test_binary_body_with_unicode_linend_encode_noop�s���3�	��i�(�2F�2F�G����������5�y�A��I���1���	�	�	�#���:�:�<���'�'��1������)�)��)�6�	�Br;c�F�Qo[U[OQ5oUOUO	2Q2UOUO	P	Q5U2UOUQ*Q2[2o[
U2oUOU2UO2o[OU2oUOUO	2Q2UOUO	P	Q5U2UOUQ*Q2P!)s������ r�z=FA=FB=FC=FD=FE=FF=20r[rErC)rr�
encode_quoprir1r]rrr�r�r�r�r�s&      r8�#test_binary_body_with_encode_quopri�7TestMIMEApplication.test_binary_body_with_encode_quopri�s���0�	��i�(�2H�2H�I��������*�,C�D���������5�y�A�����8�9�;M�N��I���1���	�	�	�#���:�:�<���'�'��1��������*�,C�D�����)�)��)�6�	�B�����9�:�<N�Or;c���Qo[U[OQ5oUOUO	2Q2UOUO	P	Q5U2[2o[
U2oUOU2UO2o[OU2oUOUO	2Q2UOUO	P	Q5U2P!)r�r�z	+vv8/f7/
r[)rr�
encode_base64r1r]rrr�r�r�r�r�s&      r8�#test_binary_body_with_encode_base64�7TestMIMEApplication.test_binary_body_with_encode_base64s���/�	��i�(�2H�2H�I��������*�L�9���������5�y�A��I���1���	�	�	�#���:�:�<���'�'��1��������*�L�9�����)�)��)�6�	�Br;rf)
rgrhrirjr�r�r�r�r�r�r�rkrlrms@r8r�r��s3����7�4�D�"C�"
C�P� C�Cr;r�c�|`�\sQsQsnQsQsQsQsQsQs	Qs
\OQ	2Q
2s
QsUsP!)�TestMIMETextic�(�[Q2UmP!��hello there)r�_msgrMs&r8rN�TestMIMEText.setUps���]�+��	r;c�^�UOoUUOO2Q2UUOOQ2Q2,oUO	UOOQU2U2UO	UOOQUQQ5U2P!)r?rArOr�r4)r1r�rHrIr�r�s&  r8�
test_types�TestMIMEText.test_typess���
�
�
��
�4�9�9�%�%�'��6�
�4�9�9���y�)�:�6����
�
�d�i�i�)�)�(�G�<�g�F��
�
�d�i�i�)�)�)�W�X�)�N��	r;c��UOUOO2Q2UOUOO	22P!r�)r1r�r]�assertFalse�is_multipartrMs&r8�test_payload�TestMIMEText.test_payload!s:��������.�.�0�-�@�������/�/�1�2r;c�j�UOo[QQQ5oUUO2OQ2UUQ*Q2[	Q2oPUm[QUQ5oUUO2OQ2UUQ*Q2UUO
2Q2P!)r�rOr�r@rPrYr)r1rrFrJr	rer]rKs&   r8�test_charset�TestMIMEText.test_charset%s���
�
�
���}�z�:��
�3�?�?��*�*�J�7�
�3�~�� @�A��'�"�� $����}�w�7��
�3�?�?��*�*�G�4�
�3�~�� =�>�
�3�?�?��m�,r;c��UOo[QQQ5oUUO2OQ2UUQ*Q2P!)r�rOr�r@rP)r1rrFrJr4s&  r8�test_7bit_input�TestMIMEText.test_7bit_input2s@��
�
�
���}�z�:��
�3�?�?��*�*�J�7�
�3�~�� @�Ar;c���UOo[Q2oUUO2Q2UUQ*Q2UOQUO	22P!)r�rOr@rP)r1rrFr�r�r4s&  r8�test_7bit_input_no_charset�'TestMIMEText.test_7bit_input_no_charset8sL��
�
�
���}�%��
�3�?�?��j�)�
�3�~�� @�A��
�
�m�S�]�]�_�5r;c���QoUOo[UQQ5oUUO2OQ2UUQ*Q2UUO	P	Q5UOQ22P!)�кирилицаrYr�r@rr[)r1rrF�output_charsetr]r�)r5�teststrr6r7s&   r8�test_utf8_input�TestMIMEText.test_utf8_input?sc��D��
�
�
���w��1��
�3�?�?��+�+�W�5�
�3�~�� =�>�
�3�?�?�$�?�'�����)@�Ar;zBcan't fix because of backward compat in email5, will fix in email6c�B�QoUO[[U2P!)r�)r��UnicodeEncodeErrorr)r5r�s& r8�test_utf8_input_no_charset�'TestMIMEText.test_utf8_input_no_charsetGs��E�����,�h��@r;)r�)rgrhrirjrNr�r�r�r�r�r��unittest�skipr�rkrlrms@r8r�r�sN����,��3�-�B�6�B��]�]���A��Ar;r�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsUsP!)�
TestMultipartiPc��[QQ29^tt^2oUO2oPPP2[QQQQ5o[WQQ5oUO	QQ	QQ
5[Q2oUO
U2UO
U2QUQ
$QUQ$QUQ$Qo[OU2oUP*]6Xc[OoL[OoU]6�cQo	LQo	QV�]$*1*o
[OQ[OU22U
*UQ$V0mV@m
VPmP!)%fhCK)9h)rsrt�	multipart�mixedr��r@r�)rJr�r�r�z$Hi there,

This is the dingus fish.
zBarry <barry@digicool.com>r�z)Dingus Lovers <cravindogs@cravindogs.com>r�zHere is your dingus fishrXg�4F�cp�A�-�+z %s%04dz%a, %d %b %Y %H:%M:%S�Date)r'r�rrr�rru�time�	localtime�timezone�altzone�strftimer�r��_txt)r5r�r_�	containerrv�intro�now�	timetuple�tzsecs�sign�tzoffsets&          r8rN�TestMultipart.setUpQs<��
�l�D�
)�
)�R��7�7�9�D�*��[�'�J�G�	��$�%5�6��
���.��"2�	�	4�����
	����������8�	�&��E�	�$��9�	�)�� ���N�N�3�'�	��R�=�A���]�]�F��\�\�F��A�:��D��D���r�k�2�2�� �M�M�#��N�N�3��!�#+�,�	�&���	����	�C*�
)�
)�s�E�E	�E	c��UOoUOoUOoUOUO	22UUO2Q2U[
UO22]2U[UO]2UO]2oUO]2oUOV@O2UOVPO2UUO2VE,2UOUO	22UOUO	22P!)rr)
r1r�r��
assertTruer�rHr^r]�
IndexErrorr�rr�r�)r5r6�raisesr��m0�m1s&     r8�test_hierarchy�TestMultipart.test_hierarchyus���
�
�
���"�"���I�I��������(�)�
�1����!2�3�
�3�q�}�}����#��z�1�=�=�!�,�
�]�]�1�
��
�]�]�1�
���
�
�b�)�)�$��
�
�b�(�(�#�
�1�=�=�?�R�H�%�������*�+�������*�+r;c�|�Qo[2OU2oUOVO22P!)z�Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY


--BOUNDARY--
)rr�r�r�)r5r�r7s&  r8�test_empty_multipart_idempotent�-TestMultipart.test_empty_multipart_idempotent�s1�����h����%�����d�M�M�O�4r;c��[QQ2oQUQ$QUQ$QUQ$UOQ2UOUO2Q	2P!)
r�r��	A subjectrX�aperson@dom.ainr��bperson@dom.ainr�r�z�Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain

--BOUNDARY

--BOUNDARY--
)rr�r�r��r5�outers& r8�/test_no_parts_in_a_multipart_with_none_epilogue�=TestMultipart.test_no_parts_in_a_multipart_with_none_epilogue�sT����g�.��&��i��'��d��)��f�
�
���:�&����e�o�o�/�
2�
	r;c��[QQ2oQUQ$QUQ$QUQ$PUmPUmUOQ2UO	UO2Q	2P!)
r�r�rrXrr�rr�r�z�Content-Type: multipart/mixed; boundary="BOUNDARY"
MIME-Version: 1.0
Subject: A subject
To: aperson@dom.ain
From: bperson@dom.ain


--BOUNDARY

--BOUNDARY--
)r�preamble�epiloguer�r�r�rs& r8�0test_no_parts_in_a_multipart_with_empty_epilogue�>TestMultipart.test_no_parts_in_a_multipart_with_empty_epilogue�sb����g�.��&��i��'��d��)��f�
�������
���:�&����e�o�o�/�2�	r;c���UOo[QQ2oQUQ$QUQ$QUQ$UOQ2[Q	2oUO	U2UUO2Q
2P!)r�r�rrXrr�rr�r�r��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--
)r�rr�rrur��r5r6rr7s&   r8�test_one_part_in_a_multipart�*TestMultipart.test_one_part_in_a_multipart�so��
�
"�
"����g�.��&��i��'��d��)��f�
�
���:�&��}�%��
���S��
�5�?�?���	r;c���UOo[QQ2oQUQ$QUQ$QUQ$PUm[Q2oUO	U2UOQ	2UUO
2Q
2P!)r�r�rrXrr�rr�r�r�aContent-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--
�r�rr rrur�r�r&s&   r8�1test_seq_parts_in_a_multipart_with_empty_preamble�?TestMultipart.test_seq_parts_in_a_multipart_with_empty_preamble�sv��
�
"�
"����g�.��&��i��'��d��)��f�
�����}�%��
���S��
���:�&�
�5�?�?���	r;c���UOo[QQ2oQUQ$QUQ$QUQ$PUm[Q2oUO	U2UOQ	2UUO
2Q
2P!�r�r�rrXrr�rr�r�r�r%r*r&s&   r8�0test_seq_parts_in_a_multipart_with_none_preamble�>TestMultipart.test_seq_parts_in_a_multipart_with_none_preamble��v��
�
"�
"����g�.��&��i��'��d��)��f�
�����}�%��
���S��
���:�&�
�5�?�?���	r;c���UOo[QQ2oQUQ$QUQ$QUQ$PUm[Q2oUO	U2UOQ	2UUO
2Q
2P!r.�r�rr!rrur�r�r&s&   r8�0test_seq_parts_in_a_multipart_with_none_epilogue�>TestMultipart.test_seq_parts_in_a_multipart_with_none_epiloguer1r;c���UOo[QQ2oQUQ$QUQ$QUQ$PUm[Q2oUO	U2UOQ	2UUO
2Q
2P!r.r3r&s&   r8�1test_seq_parts_in_a_multipart_with_empty_epilogue�?TestMultipart.test_seq_parts_in_a_multipart_with_empty_epilogue*sv��
�
"�
"����g�.��&��i��'��d��)��f�
�����}�%��
���S��
���:�&�
�5�?�?���	r;c���UOo[QQ2oQUQ$QUQ$QUQ$QUm[Q	2oUO	U2UOQ
2UUO
2Q2P!)r�r�rrXrr�rr�r*r�r�aContent-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--

r3r&s&   r8�.test_seq_parts_in_a_multipart_with_nl_epilogue�<TestMultipart.test_seq_parts_in_a_multipart_with_nl_epilogueEsv��
�
"�
"����g�.��&��i��'��d��)��f�
�����}�%��
���S��
���:�&�
�5�?�?���	r;c��UOoUOQ2oU[UO22]2UO]2oUUO	2Q2U[UO22]2UO2FDboUUO	2Q2U[UO22]2UO]2oUUO	2Q2Jd	P!)�
msg_36.txtzmultipart/alternativezmessage/external-bodyr?)r1r2r^r]rH)r5r6r7�msg1r��
subsubparts&     r8�test_message_external_body�(TestMultipart.test_message_external_body`s���
�
�
���l�l�<�(��
�3�s��� �!�1�%����q�!��
�4� � �"�$;�<�
�3�t���!�"�A�&��'�'�)�G��w�'�'�)�+B�C��s�7�&�&�(�)�1�-� �,�,�Q�/�J��z�*�*�,�l�;�	*r;c�|�UOQ2oUO[UO22]2P!)z
msg_37.txt)r2r1r^r]rns& r8�test_double_boundary�"TestMultipart.test_double_boundaryms.���l�l�<�(������S�_�_�.�/��3r;c��UOoUOQ2o[2o[OV#2UUO2Q2P!)z
msg_38.txtz�multipart/mixed
    multipart/mixed
        multipart/alternative
            text/plain
        text/plain
    text/plain
    text/plain
�r�r2rr �
_structurer��r5r6r7r�s&   r8�)test_nested_inner_contains_outer_boundary�7TestMultipart.test_nested_inner_contains_outer_boundarytsG��
�
"�
"��
�l�l�<�(���j�����S�&�
�3�<�<�>��	r;c��UOoUOQ2o[2o[OV#2UUO2Q2P!)z
msg_39.txtz�multipart/mixed
    multipart/mixed
        multipart/alternative
        application/octet-stream
        application/octet-stream
    text/plain
rFrHs&   r8�test_nested_with_same_boundary�,TestMultipart.test_nested_with_same_boundary�sG��
�
"�
"���l�l�<�(���j�����S�&�
�3�<�<�>��	r;c�j�UOQ2oUOUO2Q2P!)z
msg_40.txtz�MIME-Version: 1.0
Content-Type: text/html; boundary="--961284236552522269"

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

<html></html>

----961284236552522269--
)r2r1r�rns& r8�test_boundary_in_non_multipart�,TestMultipart.test_boundary_in_non_multipart�s+���l�l�<�(���������+�	r;c��UOo[OQ2oUOUO	22UUO2Q2U[
UO22]2P!)z�MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="    XXXX"

--    XXXX
Content-Type: text/plain


--    XXXX
Content-Type: text/plain

--    XXXX--
z    XXXX)r1r�rr
r�r�r^r]r4s&  r8� test_boundary_with_leading_space�.TestMultipart.test_boundary_with_leading_space�sb��
�
�
���'�'�)���	
����(�(�*�+�
�3����z�*�
�3�s��� �!�1�%r;c��[2OQ2oUOUO]2O2Q2P!)z�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==--zYXNkZg==)rr�r1r]rZs& r8�&test_boundary_without_trailing_newline�4TestMultipart.test_boundary_without_trailing_newline�s=���H���
#�

$��	
������q�)�5�5�7��Dr;c��[QQ2oUOUO[OO2P!�r�r�)rr�r�r�r,rZs& r8�test_mimebase_default_policy�*TestMultipart.test_mimebase_default_policy�s*���[�'�*���
�
�a�h�h���� 5� 5�6r;c��[QQ[OOQ5oUO	UO[OO2P!)r�r�r�)rr�r�r+r�rZs& r8�test_mimebase_custom_policy�)TestMultipart.test_mimebase_custom_policy�s6���[�'�%�,�,�2F�2F�G���
�
�a�h�h���� 4� 4�5r;)r�r�r)rgrhrirjrNrrrr"r'r+r/r4r7r:r@rCrIrLrOrRrUrYr\rkrlrms@r8r�r�Psp����"�H,�$5�"�$�*�2�8�6�6�6�6<�4��&�"
�&�&E�7�6�6r;r�c�X`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
UsP!)�TestNonConformanti�c���UOoUOQ2oUUO2Q2UUO2Q2UUO	2Q2P!)z
msg_14.txtr?r�r�)r1r2rHr�r�r4s&  r8�test_parse_missing_minor_type�/TestNonConformant.test_parse_missing_minor_type�sT��
�
�
���l�l�<�(��
�3���!�<�0�
�3�#�#�%�v�.�
�3�"�"�$�g�.r;c���UOoUOo[2oQUQ$UUO2Q2UUO	2Q2UUO2Q2UQQUQ$UUO2Q2UUO	2Q2UUO2Q2[
2o[U2oUOU2UUO2Q2P!)r�rDr�r?r@r�zContent-Type: foo

)
r1r�rr�r�rHrr
r�r�)r5r6�neqr7r�r�s&     r8�test_invalid_content_type�+TestNonConformant.test_invalid_content_type�s���
�
�
���#�#���i��$��N��
�3�#�#�%�v�.�
�3�"�"�$�g�.�
�3���!�<�0����#��N��
�3�#�#�%�v�.�
�3�"�"�$�g�.�
�3���!�<�0��J���a�L��	�	�	�#���A�J�J�L�1�2r;c�p�UOoUOQ2oUUO2Q2P!)�
msg_31.txtzm--BOUNDARY
Content-Type: text/plain

message 1

--BOUNDARY
Content-Type: text/plain

message 2

--BOUNDARY--
)r�r2r]r4s&  r8�test_no_start_boundary�(TestNonConformant.test_no_start_boundary�s1��
�
"�
"���l�l�<�(��
�3�?�?���	r;c�p�UOoUOQ2oUUO2Q2P!)z
msg_35.txtz�From: aperson@dom.ain
To: bperson@dom.ain
Subject: here's something interesting

counter to RFC 5322, there's no separating newline here
)r�r2r�r4s&  r8�test_no_separating_blank_line�/TestNonConformant.test_no_separating_blank_line	s0��
�
"�
"���l�l�<�(��
�3�=�=�?��	r;c�\�UOQ2oUOUQ2UO[UO2]2UOUO]*[O2UOUO]*[O2P!)z
msg_41.txtr
)	r2�
assertHasAttrr1r^r
r	r�NoBoundaryInMultipartDefect�!MultipartInvariantViolationDefectrns& r8�test_lying_multipart�&TestNonConformant.test_lying_multipart
	s}���l�l�<�(�����3�	�*�����S�[�[�)�1�-����c�k�k�!�n�$�@�@�	B����c�k�k�!�n�$�F�F�	Hr;c��UOQ2oUO]2O]2oUO[UO2]2UOUO]*[O2P!)z
msg_42.txt)r2r]r1r^r
r	r�StartBoundaryNotFoundDefect)r5r�bads&  r8�test_missing_start_boundary�-TestNonConformant.test_missing_start_boundary	sh�����\�*������"�.�.�q�1������S�[�[�)�1�-����c�k�k�!�n�$�@�@�	Br;c�&�Qo[O[OQUQ02[OO
Q5oUO
UOP	Q5Q2UOUQ*O,2P!)�base64 �#        Content-Transfer-Encoding: �'

        SGVsbG8uIFRlc3Rpbmc=
        r�r[rarBrb)r5r�r7s&  r8�.test_string_payload_with_extra_space_after_cte�@TestNonConformant.test_string_payload_with_extra_space_after_cte&	s�����'�'����=$�$'�5�)	�9�)
��\�\�)�)�	+��
	
��������5�7H�I�����$?� @� H� H�"�Mr;c�P�[O[OQ2[OO
Q5oUO
UOP	Q5Q2UQ*oUOUO[OO,2P!)zZ        Content-Transfer-Encoding: base64 some text

        SGVsbG8uIFRlc3Rpbmc=
        r�r[rarB)r�rr�r�r�r+r1r]rcr
r�InvalidHeaderDefect)r5r7r�s&  r8�-test_string_payload_with_extra_text_after_cte�?TestNonConformant.test_string_payload_with_extra_text_after_cte1	s{���'�'����9�)
��\�\�)�)�	+��
	
��������5�7H�I��-�.��������e�l�l�.N�.N�-O�Pr;c�L�Qo[O[OQUQ02[OO
Q5oUQ*oUO
V12UO
UOP	Q5Q2UOUO,2P!)rzr{r|r�rBr[ra)
r�rr�r�r�r,r1r]rcr
)r5r�r7�
pasted_ctes&   r8�7test_string_payload_with_extra_space_after_cte_compat32�ITestNonConformant.test_string_payload_with_extra_space_after_cte_compat32;	s������'�'����=$�$'�5�)	�9�)
��\�\�*�*�	,��
�4�5�
�����)���������5�7H�I�������R�0r;rf)rgrhrirjrarerirlrrrwr}r�r�rkrlrms@r8r_r_�s;����/�3�*�"	�H�
B�	N�Q�
1�
1r;r_c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsUsP!)�TestRFC2047iJ	c���UOoQo[U2oUU,QN2[U2oU[U2Q2UO	UO]LQ5Q2P!)zVRe: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz
 foo bar =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=u+Re: räksmörgås baz foo bar räksmörgåsr�ziRe: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?=
 =?mac-iceland?q?=9Arg=8Cs?=))sRe: N�s
r�ksm�rg�szmac-iceland)s
 baz foo bar Nr�)r1rrr�r�r��r5r6r��dhr�s&    r8�test_rfc2047_multiline�"TestRFC2047.test_rfc2047_multilineK	sj��
�
�
��
/��
�1�
��
�2�5�	6�
�R���
�3�v�;�D�	F����f�m�m�r�m�:�= �	!r;c��UOoQo[U2oUUQQ,2[[U22oUUQ2P!)z0=?ISO-8859-1?Q?Andr=E9?= Pirard <pirard@dom.ain>uAndré Pirard <pirard@dom.ain>)sAndr�r=)s Pirard <pirard@dom.ain>N�r1rr�rr�s&    r8�test_whitespace_keeper_unicode�*TestRFC2047.test_whitespace_keeper_unicode\	sJ��
�
�
��>��
�1�
��
�2�+�3�5�	6��[��_�%��
�6�5�6r;c��UOoQo[U2oUU,QN2[[U22oUUQ2P!)zWThe =?iso-8859-1?b?cXVpY2sgYnJvd24gZm94?= jumped over the =?iso-8859-1?b?bGF6eSBkb2c=?=z,The quick brown fox jumped over the lazy dog))sThe N)squick brown foxr=)s jumped over the N)slazy dogr=r�)r5r6r�r��hus&    r8� test_whitespace_keeper_unicode_2�,TestRFC2047.test_whitespace_keeper_unicode_2e	sF��
�
�
��e��
�1�
��
�2�K�	L�
��R��
!��
�2�=�>r;c�J�Qo[U2oUOU,QN2P!)z3Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord))sSmN���r=)srgN���r=)ssbordN�rr1�r5r�r�s&  r8�test_rfc2047_missing_whitespace�+TestRFC2047.test_rfc2047_missing_whitespacen	s&��A��
�1�
������0�	1r;c�J�Qo[U2oUOU,QN2P!)z7Sm =?ISO-8859-1?B?9g==?= rg =?ISO-8859-1?B?5Q==?= sbord))sSm Nr�)s rg Nr�)s sbordNr�r�s&  r8�test_rfc2047_with_whitespace�(TestRFC2047.test_rfc2047_with_whitespaceu	s&��E��
�1�
������1�	2r;c�v�Qo,QNoSFD*vq4[V*2oUOVTQ1,2J,	P!)z=?iso-8859-1?B?%s?=r=))zdm==�v)zdm=r�)�dmr�)zdmk=�vi)�dmkr�r�)r5r�r_�q�ar�s&     r8�test_rfc2047_B_bad_padding�&TestRFC2047.test_rfc2047_B_bad_padding|	s>��!�����D�A��q�u�%�B����R�l�"3�!4�5�r;c�D�QoUO[U2Q,2P!)z=?iso-8859-1?Q?andr=e9=zz?=)sandr�=zzr=�r1r�r5r�s& r8�test_rfc2047_Q_invalid_digits�)TestRFC2047.test_rfc2047_Q_invalid_digits�	s"��)������q�)�7�8�	:r;c�F�QoUO[U2,QN2P!)z(=?ISO-8859-1?Q?a?=))��(N��ar=��)Nr�r�s& r8�test_rfc2047_rfc2047_1�"TestRFC2047.test_rfc2047_rfc2047_1�	s ��"������q�)�>�	@r;c�F�QoUO[U2,QN2P!)z(=?ISO-8859-1?Q?a?= b))r�r�)s b)Nr�r�s& r8�test_rfc2047_rfc2047_2�"TestRFC2047.test_rfc2047_rfc2047_2�	� ��$������q�)�@�	Br;c�F�QoUO[U2,QN2P!)z'(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)�r�)sabr=r�r�r�s& r8�test_rfc2047_rfc2047_3�"TestRFC2047.test_rfc2047_rfc2047_3�	s ��5������q�)�?�	Ar;c�F�QoUO[U2,QN2P!)z((=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)r�r�r�s& r8�test_rfc2047_rfc2047_4�"TestRFC2047.test_rfc2047_rfc2047_4�	s ��6������q�)�?�	Ar;c�F�QoUO[U2,QN2P!)z,(=?ISO-8859-1?Q?a?=
    =?ISO-8859-1?Q?b?=)r�r�r�s& r8�test_rfc2047_rfc2047_5a�#TestRFC2047.test_rfc2047_rfc2047_5a�	s ��<������q�)�?�	Ar;c�F�QoUO[U2,QN2P!)z+(=?ISO-8859-1?Q?a?=
    =?ISO-8859-1?Q?b?=)r�r�r�s& r8�test_rfc2047_rfc2047_5b�#TestRFC2047.test_rfc2047_rfc2047_5b�	s ��:������q�)�?�	Ar;c�F�QoUO[U2,QN2P!)z(=?ISO-8859-1?Q?a_b?=))r�)sa br=r�r�r�s& r8�test_rfc2047_rfc2047_6�"TestRFC2047.test_rfc2047_rfc2047_6�	r�r;c	� �QoUO[U2,QN2UO[[U22O2UO	22UO[[[U222Q2P!)z((=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)z(a b))r�r�)s br{r�)r1rrr�r�r�r�s& r8�test_rfc2047_rfc2047_7�"TestRFC2047.test_rfc2047_rfc2047_7�	sk��6������q�)�
�	�	
����]�1�%5�6�=�=�?�����K�����[��q�)9�:�;�W�Er;c	�>�QoUO[U2QQ,2UO[[U22O2PO	UO222UO[
[[U222Q2P!)z9=?windows-1252?q?=22M=FCller_T=22?=
 <T.Mueller@xxx.com>u"Müller T" <T.Mueller@xxx.com>)s
"M�ller T"�windows-1252)s<T.Mueller@xxx.com>N)r1rrr�r��
splitlinesr�r�s& r8�test_multiline_header�!TestRFC2047.test_multiline_header�	s���I������q�)�
/�
+�
-�	.�	
����]�1�%5�6�=�=�?��������0�	2�����[��q�)9�:�;�:�	<r;c�D�QoUO[U2Q,2P!)�header without encoded words)r�Nr�r�s& r8�test_unencoded_ascii� TestRFC2047.test_unencoded_ascii�	s"��*������q�)�
3�4�	6r;c�D�QoUO[U2Q,2P!)�,header with unexpected non ASCII caractères)r�Nr�r�s& r8�test_unencoded_utf8�TestRFC2047.test_unencoded_utf8�	s#��<������q�)�
E�F�	Hr;rf)rgrhrirjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rkrlrms@r8r�r�J	sn����!�"7�?�1�2�6�:�@�B�A�A�A�A�B�F�<�6�H�Hr;r�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsUsP!)�TestMIMEMessagei�	c��[QQQ59^tt^2oUO2UmPPP2P!)%fhP!9h)�
msg_11.txtrYr�)r'r��_text�r5r�s& r8rN�TestMIMEMessage.setUp�	s-��
�l�W�
5�
5������D�J�6�
5�
5�
5�s�7�A	�A	c�>�UO[[Q2P!)za plain string)r�rtrrMs&r8�test_type_error�TestMIMEMessage.test_type_error�	s�����)�[�2B�Cr;c�H�UOoQo[2oV#Q$[U2oUUO2Q2UO	2oUOU[2U[U2]2U]*oUOVc2UUQ*U2P!)z
A sub-messagerXr��subject)	r1rrrHr]r	�listr^r�)r5r6r�r�rVr|r�s&      r8�test_valid_argument�#TestMIMEMessage.test_valid_argument�	s���
�
�
��!���I���)����N��
�1����!1�2��-�-�/�����g�t�,�
�3�w�<����!�*���
�
�g�!�
�7�9��w�'r;c��[2oQUQ$[2oQUQ$[U2oUO[OUO
U2P!)�	subpart 1rXz	subpart 2)rrr�r�MultipartConversionErrorru)r5r>r�rVs&   r8�test_bad_multipart�"TestMIMEMessage.test_bad_multipart�	sH���y��%��Y���y��%��Y���������&�9�9�1�8�8�T�Jr;c���[2oQUQ$UOQ2[U2oQUQ$[2o[	U2oUOU2UO
UO2Q2P!)�An enclosed messagerX�!Here is the body of the message.
zThe enclosing messagez�Content-Type: message/rfc822
MIME-Version: 1.0
Subject: The enclosing message

Subject: An enclosed message

Here is the body of the message.
)rrTrrr
r�r1r�)r5r�rVr�r�s&    r8�
test_generate�TestMIMEMessage.test_generate�	sg���I��,��)��	�
�
�:�;���N��.��)���J���a�L��	�	�	�!���������(�	r;c�l�UOoUOQ2oUUO2Q2UO2oUO	U[
2U[
U2]2U]*oUO	U[2UUQ*Q2UUO2Q2P!)r�r�r�r�r�)r1r2rHr]r	r�r^r)r5r6r7r|�submsgs&    r8�test_parse_message_rfc822�)TestMIMEMessage.test_parse_message_rfc822	
s���
�
�
���l�l�<�(��
�3���!�#3�4��/�/�#�����g�t�,�
�3�w�<����������f�g�.�
�6�)��3�4�
�6����!E�Fr;c��UOoUOQ2oUUO2Q2UOUO	22U[UO
22]2UO
]2oUUO2Q2UUO
2Q2UO
]2oUUO2Q2U[UO
22]2UO
]2oUOU[2UUQ*Q2UUOQQQ	5P2UUOQ
QQ	5P2UO
]2oUOU[2UUQ*Q2UUOQ
Q	5QQ,2UUOQQQ	5P2UO
]2oUUO2Q2UO
2oUOU[2U[U2]2U]*oUOU[2UUO2Q2UUQ*Q2P!)�
msg_16.txtrxr?a�This report relates to a message you sent with the following header fields:

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

Your message cannot be delivered to the following recipients:

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

zmessage/delivery-statuszoriginal-envelope-idz"0GK500B4HD0888@cougar.noc.ucla.edu�dnsz
reporting-mtar4�nsd�action�failedzoriginal-recipientr�zfinal-recipientr��
message-idz(<002001c144a6$8752e060$56104586@oxy.edu>)r�r;)zjangel1@cougar.noc.ucla.edur;)r1r2rHr
r�r^r]r	rrIr<r�)r5r6r7r��dsn1�dsn2r|r?s&       r8�test_dsn�TestMIMEMessage.test_dsn
s"��
�
�
���l�l�<�(��
�3���!�#5�6�����(�(�*�+�
�3�s��� �!�1�%��/�/�!�$��
�7�#�#�%�|�4�
�7��� �#�	�$�/�/�!�$��
�7�#�#�%�'@�A�
�3�w�"�"�$�%�q�)��"�"�1�%�����d�G�,�
�4�&�'�)M�N�
�4�>�>�%��>�8�"�=�
�4�>�>�%��>�8�$�?��"�"�1�%�����d�G�,�
�4��>�8�$�
�4�?�?�"6�?�7��?�@�	B�
�4�>�>�(�+<�>�=�r�B��/�/�!�$��
�7�#�#�%�'7�8��%�%�'�����g�t�,�
�3�w�<����Q�Z�
����j�'�2�
�:�&�&�(�,�7�
�:�l�#�5�	7r;c��UOo[QQQ59^tt^2oUO2oPPP2[2oQUQ$QUQ$QUQ$Q	UmQ
Um[
Q2o[
Q2oUOQ
QQQ5UOU2UOU2[2o[U2oUOU2UUO2W2P!)%fhK�9h)�
msg_21.txtrYr�rr�rr�r�rX�MIME messagezEnd of MIME message
r�r�rDrrr�r�)
r�r'r�rr r!rr�rurr
r�r�)	r5r6r�r�r7r>r�r�r�s	&        r8�
test_epilogue�TestMIMEMessage.test_epilogueN
s���
�
"�
"��
�l�W�
5�
5���7�7�9�D�6��i��'��F��%��D�	���I��%���.��������������~�'8�:��N��
�
�4���
�
�4���j���c�N��	�	�	�#��
�3�<�<�>�4� �!6�
5�s�C.�.C>	�7C>	c�4�UOo[2oQUQ$QUQ$QUQ$QUmPUm[	Q2o[	Q2oUOQ	Q
QQ5UO
U2UO
U2UUO2Q
2P!)rr�rr�r�rXrr�r�rDrrr�r�adFrom: 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--
)r�rr r!rr�rur�)r5r6r7r>r�s&    r8�test_no_nl_preamble�#TestMIMEMessage.test_no_nl_preambleb
s���
�
"�
"���i��'��F��%��D�	���I��%�����������������~�'8�:��N��
�
�4���
�
�4��
�3�=�=�?��	r;c��UOo[QQQ59^tt^2o[OU2oPPP2WO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2P!)%fhCK9h)r�rYr�r�r?�r1r'r��message_from_filer]�get_default_typerH�r5r6r�r7�
container1�
container2�container1a�container2as&       r8�test_default_type�!TestMIMEMessage.test_default_type�
���
�
�
��
�l�W�
5�
5���)�)�"�-�C�6��_�_�Q�'�
�
�:�&�&�(�*:�;�
�:�&�&�(�*:�;��_�_�Q�'�
�
�:�&�&�(�*:�;�
�:�&�&�(�*:�;� �,�,�Q�/��
�;�'�'�)�<�8�
�;�'�'�)�<�8� �,�,�Q�/��
�;�'�'�)�<�8�
�;�'�'�)�<�8�6�
5�
5���E�E	�	E	c��UOo[QQQ59^tt^2o[OU2oPPP2WO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2UO	]2oUUO2Q2UUO
2Q2P!)%fhCK9h)r�rYr�r�r?rrs&       r8�.test_default_type_with_explicit_container_type�>TestMIMEMessage.test_default_type_with_explicit_container_type�
rrc���UOoUOo[QQ2oPUm[	Q2o[	Q2o[U2o[U2oUO
U2UO
U2UUO2Q2UUO2Q2UUO2Q2UUO2Q2UUO]2Q2UQUQUQUQUUO2Q2UUO2Q2UUO2Q2UUO2Q2UUO]2Q2P!)	�digestr��
message 1
�
message 2
r�a�Content-Type: multipart/digest; boundary="BOUNDARY"
MIME-Version: 1.0

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

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

message 1

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

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

message 2

--BOUNDARY--
r@r>aBContent-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--
)
r1r�rr!rrrurHrr�)r5r6rdr�	subpart1a�	subpart2a�subpart1�subpart2s&       r8�test_default_type_non_parsed�,TestMIMEMessage.test_default_type_non_parsed�
sf��
�
�
���#�#��!�(�J�7�	��	���]�+�	��]�+�	��y�)���y�)������"�����"�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9��I����"�%�	�4
�^�$��^�$��^�$��^�$�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9�
�8�$�$�&�(8�9��I����"�%�	r;c��UOo[P2o[P2o[V#1Q5oU[UO	22]2UUO	]2U2UUO	]2U2P!)r;)�	_subparts)r1rrr^r])r5r6�text1�text2r7s&    r8�$test_mime_attachments_in_constructor�4TestMIMEMessage.test_mime_attachments_in_constructor�
sg��
�
�
�����������u�n�5��
�3�s��� �!�1�%�
�3�?�?�1��u�%�
�3�?�?�1��u�%r;c�Z�[2oUOUO22P!rl)rr
r�rns& r8�"test_default_multipart_constructor�2TestMIMEMessage.test_default_multipart_constructor�
s���o������(�(�*�+r;c�v�[2oQUQ$QUQ$UOUOQ2QQ,2P!)�a@b.comr��c@d.comr�)rr1r3rns& r8�test_multipart_default_policy�-TestMIMEMessage.test_multipart_default_policy�
s9���o����D�	���D�	�������T�*�Y�	�,B�Cr;c� �[[OOQ5oQUQ$UO	[
29^tt^2oQUQ$PPP2UO
[WO2Q2P!)%fhK79h)r�r2r�r3z.There may be at most 1 To headers in a message)	rr�r�r+r�r�r1r�r4)r5r7r6s&  r8�test_multipart_custom_policy�,TestMIMEMessage.test_multipart_custom_policysf���5�<�<�#7�#7�8����D�	�
�
�
�z�
*�
*�b�!�C��I�+�����R�\�\�*�I�	K�+�
*�s�A=�=B
	�B
	)r�)rgrhrirjrNr�r�r�r�r�rr	rrrr&r,r/r4r7rkrlrms@r8r�r��	sd����#�D�(�K��(
G�77�r!�(!�F9�"9�"H�T&�,�D�K�Kr;r�c�.`�\sQsQsnQsQsQsUsP!)�TestNonMultipartic�^�[QQ2oUOUO22P!)r�r�)rr�r�rns& r8�"test_nonmultipart_is_not_multipart�3TestNonMultipart.test_nonmultipart_is_not_multiparts%���v�w�/������)�)�+�,r;c��[2oQUQ$[QQ2oUO[OUO
U2P!)r�rXr�r�)rrr�rr�ru)r5r7rVs&  r8�test_attach_raises_exception�-TestNonMultipart.test_attach_raises_exceptions:���i��$��I���V�W�-�����&�9�9�1�8�8�S�Ir;rf)rgrhrirjr<r?rkrlrms@r8r:r:s����-�J�Jr;r:c�`�\sQsQsnQsQsQQksQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsUsP!)�TestIdempotentir*c��[UQQ59^tt^2oUO2oPPP2[OW2oVC1!)%fhK)9h�rYr��r'r�r�r�r5rr�r_r7s&&   r8r2�TestIdempotent._msgobj#sB��
�h��
1�
1�R��7�7�9�D�2��'�'��-���y��2�
1�s�A	�	A	�A	c��UOo[2o[U]Q5oUOVQ5UV%O	22P!)rrr�)r�rr
r�r�)r5r7r�r�r6r�r�s&&&&   r8�_idempotent�TestIdempotent._idempotent)s<��
�
"�
"���J���a�a�(��	�	�	�#�	�)�
�4����r;c��UOoUOQ2vq#UUO2Q2UUO2Q2UUO	2Q2UUO2]*Q2UUO
Q2Q2UUOP2UUOP2UOV#2P!)r�r?r�r�rArO)rArO)
r1r2rHr�r�r<rIr r!rI�r5r6r7r�s&   r8�test_parse_text_message�&TestIdempotent.test_parse_text_message0s���
�
�
���L�L��.�	��
�3���!�<�0�
�3�#�#�%�v�.�
�3�"�"�$�g�.�
�3�>�>��A�� 7�8�
�3�=�=��#�Z�0�
�3�<�<���
�3�<�<�������#r;c���UOoUOQ2vq#UUO2Q2UUO2P2UUO	Q2P2UOV#2P!)r�r?rA)r1r2rHr<rIrIrLs&   r8�test_parse_untyped_message�)TestIdempotent.test_parse_untyped_message<sb��
�
�
���L�L��.�	��
�3���!�<�0�
�3�>�>��T�"�
�3�=�=��#�T�*�����#r;c�P�UOQ2vqUOV2P!)r��r2rI�r5r7r�s&  r8�test_simple_multipart�$TestIdempotent.test_simple_multipartD� ���L�L��.�	������#r;c�P�UOQ2vqUOV2P!)�
msg_02.txtrSrTs&  r8�test_MIME_digest�TestIdempotent.test_MIME_digestHrWr;c�P�UOQ2vqUOV2P!)z
msg_27.txtrSrTs&  r8�test_long_header�TestIdempotent.test_long_headerLrWr;c�P�UOQ2vqUOV2P!)r�rSrTs&  r8�"test_MIME_digest_with_part_headers�1TestIdempotent.test_MIME_digest_with_part_headersPrWr;c�P�UOQ2vqUOV2P!)�
msg_06.txtrSrTs&  r8�test_mixed_with_image�$TestIdempotent.test_mixed_with_imageTrWr;c�P�UOQ2vqUOV2P!)rurSrTs&  r8�test_multipart_report�$TestIdempotent.test_multipart_reportXrWr;c�P�UOQ2vqUOV2P!)r�rSrTs&  r8r�TestIdempotent.test_dsn\rWr;c�P�UOQ2vqUOV2P!)rrSrTs&  r8�test_preamble_epilogue�%TestIdempotent.test_preamble_epilogue`rWr;c�P�UOQ2vqUOV2P!)z
msg_23.txtrSrTs&  r8�test_multipart_one_part�&TestIdempotent.test_multipart_one_partdrWr;c�P�UOQ2vqUOV2P!)z
msg_24.txtrSrTs&  r8�test_multipart_no_parts�&TestIdempotent.test_multipart_no_partshrWr;c�P�UOQ2vqUOV2P!)rhrSrTs&  r8ri�%TestIdempotent.test_no_start_boundarylrWr;c�P�UOQ2vqUOV2P!)�
msg_32.txtrSrTs&  r8�test_rfc2231_charset�#TestIdempotent.test_rfc2231_charsetprWr;c�P�UOQ2vqUOV2P!)z
msg_33.txtrSrTs&  r8�test_more_rfc2231_parameters�+TestIdempotent.test_more_rfc2231_parameterstrWr;c�P�UOQ2vqUOV2P!)z
msg_34.txtrSrTs&  r8�%test_text_plain_in_a_multipart_digest�4TestIdempotent.test_text_plain_in_a_multipart_digestxrWr;c�P�UOQ2vqUOV2P!)zmsg_12a.txtrSrTs&  r8�test_nested_multipart_mixeds�+TestIdempotent.test_nested_multipart_mixeds|s ���L�L��/�	������#r;c�P�UOQ2vqUOV2P!)r=rSrTs&  r8�%test_message_external_body_idempotent�4TestIdempotent.test_message_external_body_idempotent�rWr;c�T�UOQ2vqUOVP	Q5P!)�
msg_43.txtr�rSrTs&  r8�test_message_delivery_status�+TestIdempotent.test_message_delivery_status�s%���L�L��.�	������T��2r;c�P�UOQ2vqUOV2P!��
msg_45.txtrSrTs&  r8�test_message_signed_idempotent�-TestIdempotent.test_message_signed_idempotent�rWr;c�p�UOoUOQ2vq#UUO2Q2-oUO2FD	vqVVdU$J	UUQ*Q2UUQ*Q2UUOQUO
*2UUOUO
2U[UO22]2UO]2oUUO2Q2UUO2QUO
*2UO]2oUUO2Q2UUO2QUO
*2UO]2o	UU	O2Q	2UOU	[2U	O2o
UOU
[2U[U
2]2U
]*oUOU[2UUO2QUO
*2P!)
rurxrvr{r@rzz$This is a MIME-encapsulated message.r?zYadda yadda yaddar�)r1r2rHr<r r�r!r^r]r	rr�)r5r6r7r��params�pk�pvr>r��msg3r|�msg4s&           r8�test_content_type� TestIdempotent.test_content_type�s���
�
�
���L�L��.�	��
�3���!�#5�6����n�n�&�F�B��2�J�'�
�6�-� �"3�4�
�6�*��F�G�
�3�<�<�?�$�,�,�N�O�
�3�<�<����&�
�3�s��� �!�1�%����q�!��
�4� � �"�L�1�
�4����2�T�\�\�A�B����q�!��
�4� � �"�L�1�
�4����2�T�\�\�A�B����q�!��
�4� � �"�$4�5����d�G�,��"�"�$�����g�t�,�
�3�w�<����q�z�����d�G�,�
�4����2�T�\�\�A�Br;c���UOoUOQ2vq#UUO2Q2UO2oUO	U[
2U[
U2]2U]*oUO	U[2UUO2Q2UO	UO2[2UUO2UO2P!)rcr�r?)
r1r2rHr]r	r�r^rr�r�)r5r6r7r�r|r>s&     r8�test_parser�TestIdempotent.test_parser�s���
�
�
���L�L��.�	��
�3���!�#3�4��/�/�#�����g�t�,�
�3�w�<����q�z�����d�G�,�
�4� � �"�L�1����d�.�.�0�#�6�
�4����t�|�|�,r;rf�F)rgrhrirjr�r2rIrMrPrUrZr]r`rdrgrrlrorrrirxr{r~r�r�r�r�r�r�rkrlrms@r8rBrBs������G���
$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�$�3�$�C�>-�-r;rBc��`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Q s"Q!s#Q"s$Q#s%Q$s&Q%s'Q&s(Q's)Q(s*Q)s+Q*s,Q+s-Q,s.\/O`2\1OdQ-2Q.22s3Q/s4Q0s5Q1s6Q2s7Q3s8Q4s9Q5s:Q6s;Q7s<Q8s=Q9s>Q:s?Q;s@Q<sAQ=sBQ>sCUsDP!)?�TestMiscellaneousi�c�D�[QQQ59^tt^2oUO2oPPP2[OW2o[	2o[U]Q5oUO
U2UOV$O22P!)%fhKo9h�r�rYr�r�	r'r�r�rrr
r�r1r��r5r�r�r7r�r�s&     r8�test_message_from_string�*TestMiscellaneous.test_message_from_string�sn��
�l�W�
5�
5���7�7�9�D�6��'�'��-���J��
�a�a�(��	�	�	�#������z�z�|�,�6�
5�s�B�B	�B	c�h�[QQQ59^tt^2oUO2oUO]2[OU2o[2o[
U]Q5oUOU2UOV$O22PPP2P!)%fhP!9hr�)
r'r��seekr�rrr
r�r1r�r�s&     r8�test_message_from_file�(TestMiscellaneous.test_message_from_file�sz��
�l�W�
5�
5���7�7�9�D��G�G�A�J��)�)�"�-�C��
�A��!�!�,�A�
�I�I�c�N����T�:�:�<�0�6�
5�
5�
5�s�A?B � B1	�)B1	c��[QQQ59^tt^2oUO2oPPP2QQ[2o[OWU2oUOVC2[QQQ59^tt^2oUO2oPPP2[OV#2oUO
2FDoUOVS2J	P!)%fhK�9h)%fhKd9h)r�rYr�c��\sQsQsQsP!)�HTestMiscellaneous.test_message_from_string_with_class.<locals>.MyMessagei�rf�rgrhrirjrkrfr;r8�	MyMessager�����r;r�rY)r'r�rr�rr	�walk)r5r�r�r�r7r�s&     r8�#test_message_from_string_with_class�5TestMiscellaneous.test_message_from_string_with_class�s���
�l�W�
5�
5���7�7�9�D�6�	��	��'�'��i�8�����c�-�
�l�W�
5�
5���7�7�9�D�6��'�'��8���x�x�z�G��!�!�'�5�"�6�
5��6�
5�s#�C�<C)�C&	�C&	�)C9	�2C9	c��QQ[2o[QQQ59^tt^2o[OV!2oPPP2UO	WU2[QQQ59^tt^2o[OV!2oPPP2UO2FDoUO	VA2J	P!)%fhK�9h)%fhKN9h)c��\sQsQsQsP!)�FTestMiscellaneous.test_message_from_file_with_class.<locals>.MyMessagei�rfr�rfr;r8r�r��r�r;r�r�rYr�rY)rr'r�rr	r�)r5r�r�r7r�s&    r8�!test_message_from_file_with_class�3TestMiscellaneous.test_message_from_file_with_class�s���	��	��l�W�
5�
5���)�)�"�8�C�6����c�9�-�
�l�W�
5�
5���)�)�"�8�C�6��x�x�z�G��!�!�'�5�"�
6�
5��6�
5�s#�B6�,C	�6C	�?C	�	C	�C	c�l�QQ[2oUOQU2oUOV!2P!)c�4``�\sQsQsnU1QksQsUsU9s!)�STestMiscellaneous.test_custom_message_does_not_require_arguments.<locals>.MyMessagei�c�&:�[RU_2P!rl)�super�__init__)r5�	__class__s&�r8r��\TestMiscellaneous.test_custom_message_does_not_require_arguments.<locals>.MyMessage.__init__�s����� �"r;rf)rgrhrirjr�rkrl�
__classcell__)r�rns@@r8r�r��s����
#�
#r;r�zSubject: test

test)r�_str_msgr	)r5r�r7s&  r8�.test_custom_message_does_not_require_arguments�@TestMiscellaneous.test_custom_message_does_not_require_arguments�s/��	#��	#��m�m�3�Y�?�����c�-r;c�l�[Q2oUO[UO2,QN2P!)r�)rrArr�
feedparserr�r�r r\�message_from_binary_filer�rrrur�r!r")�
__import__r1�sorted�__all__)r5�modules& r8�test__all__�TestMiscellaneous.test__all__�s*���G�$���������/�2�	r;c���[O2oUO[O[OU22Q*[O
U2Q*2P!)�N�N)r�r1r"�	parsedate�
formatdate�gmtime�r5rs& r8�test_formatdate�!TestMiscellaneous.test_formatdatesG���i�i�k���������)9�)9�#�)>�?��C����S�)�"�-�	/r;c	���[O2oUO[O[OUP	Q52Q*[O
U2Q*2P!)T�r�r�)r�r1r"r�r�r�r�s& r8�test_formatdate_localtime�+TestMiscellaneous.test_formatdate_localtimesJ���i�i�k������O�O�E�,�,�S�D�A�B�2�F��N�N�3���#�	%r;c	�x�[O2oUO[OUP
Q5[OQ[O
U222UO[OUP
P	Q5[OQ[O
U222P!)Fr�z%a, %d %b %Y %H:%M:%S -0000)r��usegmtz%a, %d %b %Y %H:%M:%S GMT)r�r1r"r�rr�r�s& r8�test_formatdate_usegmt�(TestMiscellaneous.test_formatdate_usegmts���i�i�k��������S�E�2��M�M�7����S�9I�J�	L�	
������S�E�$�?��M�M�5�t�{�{�3�7G�H�	Jr;c	��,QNoSFDpoUOUQ59^tt^2UO[OU22UO[OU22PPP2Jr	UO[OP22UO[OP22P!)%fhJ�9h)r;)�dtstr)	r;r+�0zA Complete Waste of Timez Wed, 3 Apr 2002 12.34.56.78+0800z17 June , 2022zFriday, -Nov-82 16:14:55 ESTzFriday, Nov--82 16:14:55 ESTzFriday, 19-Nov- 16:14:55 EST)r[rr"r��parsedate_tz)r5�
invalid_datesr�s&  r8�/test_parsedate_returns_None_for_invalid_strings�ATestMiscellaneous.test_parsedate_returns_None_for_invalid_stringss���

�
�#�E����E��*�*��!�!�%�/�/�%�"8�9��!�!�%�"4�"4�U�";�<�+�*�#�
	
���%�/�/�$�/�0����%�,�,�T�2�3�+�*�*�s�AC		�	C
�C
c���UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2P!)zWed, 3 Apr 2002 14:58:26 +0800zWed,3 Apr 2002 14:58:26 +0800zWed 3 Apr 2002 14:58:26 +0800�
������:�rr�����p�r1r"r�rMs&r8�test_parsedate_compact�(TestMiscellaneous.test_parsedate_compact1sf������+�+�,L�M�B�	D�	
����+�+�,K�L�B�	D�	
����+�+�,K�L�B�	Dr;c��UOoU[OQ2Q2U[OQ2Q2P!)�5 Feb 2003 13:47:26 -0800zFebruary 5, 2003 13:47:26 -0800�
�����
�/r�rr�r�透��r��r5r6s& r8�test_parsedate_no_dayofweek�-TestMiscellaneous.test_parsedate_no_dayofweek;s?��
�
�
��
�5���9�:�5�	7�
�5���?�@�5�	7r;c�T�UO[OQ2Q2P!)zWed, 3 Apr 2002 14:58:26+0800r�r�rMs&r8�.test_parsedate_no_space_before_positive_offset�@TestMiscellaneous.test_parsedate_no_space_before_positive_offsetBs!������+�+�,K�L�4�	6r;c�T�UO[OQ2Q2P!)zWed, 3 Apr 2002 14:58:26-0800)
r�r�r�r�r�r�rr�r�r�r�rMs&r8�.test_parsedate_no_space_before_negative_offset�@TestMiscellaneous.test_parsedate_no_space_before_negative_offsetFs!������+�+�,K�L�5�	7r;c��UOoU[OQ2Q2U[OQ2Q2P!)z5 Feb 2003 13.47.26 -0800z5 Feb 2003 13.47 -0800r�)
r�r�r�r�r�rrr�r�r�r�r�s& r8�%test_parsedate_accepts_time_with_dots�7TestMiscellaneous.test_parsedate_accepts_time_with_dotsKs?��
�
�
��
�5���9�:�5�	7�
�5���6�7�4�	6r;c�T�UO[OQ2Q2P!)zFriday, 19-Nov-82 16:14:55 EST)
i����r��7rr�r�i����r�rMs&r8�test_parsedate_rfc_850�(TestMiscellaneous.test_parsedate_rfc_850Rs!������+�+�,L�M�7�	9r;c�T�UO[OQ2Q2P!)zWed, 3 Apr 2002 14:58 +0800�
r�r�r�r�r�rrr�r�r�r�rMs&r8�test_parsedate_no_seconds�+TestMiscellaneous.test_parsedate_no_secondsVs"������+�+�,I�J�A�	Cr;c��UO[OQ2Q2UO[OQ2Q2P!)zWed, 3 Apr 2002 14.58.26 +0800zWed, 3 Apr 2002 14.58 +0800r�rr�rMs&r8�!test_parsedate_dot_time_delimiter�3TestMiscellaneous.test_parsedate_dot_time_delimiterZsB������+�+�,L�M�B�	D�����+�+�,I�J�A�	Cr;c	�X�UOo[OQ2o[[O
U22oU[OU2Q*UQ*2U[[OQU22Q2[OQ2o[[O
UQ*22oU[OU2Q*UQ*2U[[OQUQ*22Q2P!)r�r�z%Yr�:N�	N)	r1r"r��intr��mktimer�rr�)r5r6�timetupr;s&   r8�+test_parsedate_acceptable_to_time_functions�=TestMiscellaneous.test_parsedate_acceptable_to_time_functions`s���
�
�
���/�/�"=�>������G�$�%��
�4�>�>�!��R� �'�"�+�.�
�3�t�}�}�T�7�+�,�d�3��$�$�%@�A������G�B�K�(�)��
�4�>�>�!��R� �'�"�+�.�
�3�t�}�}�T�7�2�;�/�0�$�7r;c��UO[OQ2]2UO[OQ2Q2P!)�)
rr�r�rrrr�r�r�r)
rr�r�rrrr�r�r�i�i.���)r1r"�	mktime_tzrMs&r8�test_mktime_tz� TestMiscellaneous.test_mktime_tzksE��������*9�:�;<�	>�������*<�=�>C�	Er;c���UO[OQ2[OQ22UO[OQ2[OQ22P!)z�Test for parsing a date with a two-digit year.

Parsing a date with a two-digit year should return the correct
four-digit year. RFC 822 allows two-digit years, but RFC 5322 (which
obsoletes RFC 2822, which obsoletes RFC 822) requires four-digit years.

z25 Feb 03 13:47:26 -0800z25 Feb 2003 13:47:26 -0800z25 Feb 71 13:47:26 -0800z25 Feb 1971 13:47:26 -0800r�rMs&r8�test_parsedate_y2k�$TestMiscellaneous.test_parsedate_y2kqs\��	
����+�+�,F�G��+�+�,H�I�	K�����+�+�,F�G��+�+�,H�I�	Kr;c���UO[OQ2Q2UO[O[OQ22P2P!)z<>rY�r1r"�	parseaddr�
formataddrrMs&r8�test_parseaddr_empty�&TestMiscellaneous.test_parseaddr_empty~s?���������.��9�����)�)�%�/�/�$�*?�@�"�Er;c���UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2P!)za@b@cza@b.c@cza@172.17.0.1@crY�r1r"r#rMs&r8�test_parseaddr_multiple_domains�1TestMiscellaneous.test_parseaddr_multiple_domains�s^������O�O�G�$��	
�	
����O�O�I�&��	
�	
����O�O�,�-��	
r;c�T�UO[OQ2Q2P!)�A Silly PersonzA Silly Person <person@dom.ain>)r,�person@dom.ain�r1r"r$rMs&r8�test_noquote_dump�#TestMiscellaneous.test_noquote_dump�s"��������A�B�-�	/r;c� �UO[OQ2Q2UO[OQ2Q2QoQoUO[O[OV122V12P!)�A (Very) Silly Personr-z("A (Very) Silly Person" <person@dom.ain>z*"A \(Very\) Silly Person" <person@dom.ain>zA \(Special\) Person)r2r-�r1r"r$r#�r5r�r_s&  r8�test_escape_dump�"TestMiscellaneous.test_escape_dump�sv��������H�I�7�	9�	
����O�O�I�J�7�	9�
$�����������)9�)9�1�&�)A�B�Q�F�Kr;c���UO[OQ2Q2QoQoUO[O[OV122V12P!)�Arthur \Backslash\ Foobarr-z."Arthur \\Backslash\\ Foobar" <person@dom.ain>)r8r-r3r4s&  r8�test_escape_backslashes�)TestMiscellaneous.test_escape_backslashes�sV��������M�N�=�	?�
)�����������)9�)9�1�&�)A�B�Q�F�Kr;c��QoQoQoQoUO[OV12U2UO[OV1Q2U2P!)�Häns Würstr-�-=?utf-8?b?SMOkbnMgV8O8cnN0?= <person@dom.ain>z0=?iso-8859-1?q?H=E4ns_W=FCrst?= <person@dom.ain>r=r.)r5rJ�addr�utf8_base64�
latin1_quopris&    r8�test_quotes_unicode_names�+TestMiscellaneous.test_quotes_unicode_names�sU��%����E��J�
�����)�)�4�,�7��E�����)�)�4�,��E��	r;c�`�QoQoQoQnU1QkQ2oU2oR8QU8Q0oUO[OV1U2U2UO[OV1[Q22U2P!)	r<r-r=�FOOBARc�0:`�\sQsQsnU1QksQsUsP!)�KTestMiscellaneous.test_accepts_any_charset_like_object.<locals>.CharsetMocki�c�
:�R!rlrf)r5�stringr�s&&�r8�
header_encode�YTestMiscellaneous.test_accepts_any_charset_like_object.<locals>.CharsetMock.header_encode�s����
r;rf)rgrhrirjrIrkrl)rnr�s@�r8�CharsetMockrF�s����
�
r;rKz <�>rY)r1r"r$r	)r5rJr>r?rK�mock�
mock_expectedr�s&      @r8�$test_accepts_any_charset_like_object�6TestMiscellaneous.test_accepts_any_charset_like_object�sz���%����E����	�	��}��%+�T�2�
�����)�)�4�,��=�}�M�����)�)�4�,���8H�I��	r;c�r�QoQo[2oUO[[OV1U2P!)r<r-)�objectr��AttributeErrorr"r$)r5rJr>�bad_charsets&   r8�-test_invalid_charset_like_object_raises_error�?TestMiscellaneous.test_invalid_charset_like_object_raises_error�s2��%�����h�����.�%�*:�*:�T�L��	r;c��QoUO[[OPU12UO[[OQU12P!)upersön@dom.in�Name)r��UnicodeErrorr"r$�r5r>s& r8�!test_unicode_address_raises_error�3TestMiscellaneous.test_unicode_address_raises_error�s?��#�����,��(8�(8�4��,�G����,��(8�(8�6�4�.�Ir;c��QoQoQQqCUO[OU2V412UO[OU2V412UO[OV412U2P!)zJohn X. Doe <jxd@example.com>z"John X. Doe" <jxd@example.com>zJohn X. Doezjxd@example.comr")r5r
�yr�r_s&    r8�test_name_with_dot�$TestMiscellaneous.test_name_with_dot�sg��+��-���0�1��������+�a�V�4��������+�a�V�4�����)�)�1�&�1�1�5r;c���UOoU[OQ2Q2U[OQ2Q2U[OQ2Q2P!)�""example" example"@example.com�!"\"example\" example"@example.com�#"\\"example\\" example"@example.com)r;rb)r;rc)r;rdr(r�s& r8�2test_parseaddr_preserves_quoted_pairs_in_addresses�DTestMiscellaneous.test_parseaddr_preserves_quoted_pairs_in_addresses�sT���
�
��
�5�?�?�<�=�
1�	3�
�5�?�?�@�A�
5�	7�
�5�?�?�D�E�
9�	;r;c��UOQ[OQ22UOQ[OQ22UOQ[OQ22UOQ[OQ22UOQ	[OQ22P!)
r;�merwok wok@xample.com�merwok  wok@xample.comz merwok  wok  @xample.com�merwok"wok"  wok@xample.comzmerwok. wok .  wok@xample.com)r;rh)r;ri)r;rj)r;zmerwok.wok.wok@xample.comr(rMs&r8�-test_parseaddr_preserves_spaces_in_local_part�?TestMiscellaneous.test_parseaddr_preserves_spaces_in_local_part�s���	
���6��O�O�3�4�	6����7��O�O�4�5�	7����7��O�O�7�8�	:����<��O�O�9�:�	<����:��O�O�;�<�	>r;c��QoQoUO[OU2U2UO[OU2U2P!)�#'foo@example.com' (foo@example.com)z7"'foo@example.com' (foo@example.com)" <foo@example.com>)rn�foo@example.comr")r5r>�addrstrs&  r8�6test_formataddr_does_not_quote_parens_in_quoted_string�HTestMiscellaneous.test_formataddr_does_not_quote_parens_in_quoted_string�sE��#��C���������1�4�8�����)�)�$�/��9r;c�X�QoUO[OU2Q2P!)zFoo
	Bar <foo@example.com>)zFoo Barror()r5r
s& r8�test_multiline_from_comment�-TestMiscellaneous.test_multiline_from_comment
s%��
��	
�������+�-K�Lr;c�T�UO[OQ2Q2P!)�A Silly; Personz""A Silly; Person" <person@dom.ain>)rwr-r.rMs&r8�test_quote_dump�!TestMiscellaneous.test_quote_dump
s"��������B�C�1�	3r;c�X�UOoUOo[2o[2oUUQ2UUQ2UUQ2UQU2UQU2UQU2UUQ2UUQ2UUQ2UQU2UQU2UQU2UV42UVC2P!)rO�US-ASCIIzUs-AsCiI�usascii�USASCII�UsAsCiI)r1�assertNotEqualr	)r5r6�ne�cset1�cset2s&    r8�test_charset_richcomparisons�.TestMiscellaneous.test_charset_richcomparisons
s���
�
�
��
�
 �
 ���	���	��
�5�*��
�5�*��
�5�*��
�:�u��
�:�u��
�:�u��
�5�)��
�5�)��
�5�)��
�9�e��
�9�e��
�9�e��
�5��
�5�r;c�b�UOoU[OQQ,2QQ,2P!)�aperson@dom.ain (Al Person)zBud Person <bperson@dom.ain>�z	Al Personr)z
Bud Personr�r1r"�getaddressesr�s& r8�test_getaddresses�#TestMiscellaneous.test_getaddresses%
s9��
�
�
��
�5���<�=�?�@�,�-�/�	0r;c�\�UO[O,QN2,QN2P!)zGH-106669 regression test.)z"Bud, Person" <bperson@dom.ain>r�z#"Mariusz Felisiak" <to@example.com>))zBud, Personrr�)zMariusz Felisiak�to@example.comr�rMs&r8�test_getaddresses_comma_in_name�1TestMiscellaneous.test_getaddresses_comma_in_name,
s(���������
�
�
	
r;c��	�QoQoQoQQUQ0U1,1QPU1UPU1,1QPU1UPU1U,1QPU1UPU1,1QPUQUQ	01,1Q
PU1UPU1,1QV3PU1,1QPU1UPU1,1Q
PU1PU1,1QPUQ*1PU1,1QPU1PQUQ01,11FD�vqEUUQUQ0oUOUQ59^tt^2UO[OU,2U,2UO[OU,P
Q5U2UO[OU,2U2UO[OU,P
Q5PU12PPP2J�	UQUQ0oUO[OU,2PU1PU1,2UO[OU,P
Q5PU1PU1,2UO[OU,2U2UO[OU,P
Q5PU12QoQoUO[OU,2U,2UO[OU,P
Q5U,2UO[OU,2U2UO[OU,P
Q5PU12QoQoUO[OU,2U,2UO[OU,P
Q5U,2UO[OU,2U2UO[OU,P
Q5PU12QoUO[OU,2U,2UO[OU,P
Q5,QN2UO[OU,2U2UO[OU,P
Q5PU12QoUO[OU,2QQ,2UO[OU,P
Q5QQ,2UO[OU,2U2UO[OU,P
Q5PU12UO[
OOP	2P!)%fhCJl9h)z>Test for parsing errors from CVE-2023-27043 and CVE-2019-16056�alice@example.org�bob@example.com�(�<rL�)�[z[<z>]�]�@rX�:�.�")�address��strictz,<z,"Alice, alice@example.org" <bob@example.com>zalice@example.org (Alice)zalice@example.org )Alice(�<"Jane Doe" <jane@example.net>, "John Doe" <john@example.net>rY)zAlice, alice@example.orgr�)�Alicer�))r;r�rY)r;r�)zJane Doezjane@example.net)zJohn Doezjohn@example.net)r[r1r"r�r#r��supports_strict_parsing)r5�alice�bob�empty�invalid_separator�expected_non_strictr��expected_stricts&       r8�test_parsing_errors�%TestMiscellaneous.test_parsing_errors=
s��#�������a��u�A�J��&�'�(�
�B��;���C�y�1�2�
�B��;���C�y�%�8�9�
�B��;���C�y�1�2�
�B�5�'��C�5��+�,�-�.�
�B��;���C�y�1�2�
�5�"�c��+�,�
�B��;���C�y�1�2�
�B��;��S�	�*�+�
�B����$�r�3�i�0�1�
�B��;��q���Q�Z� 0�1�2�7
�2���� 1�2�!�C�5��:�G����g��.�.�� � ��!3�!3�W�I�!>�"'��*�� � ��!3�!3�W�I�e�!L�!4�6�� � ����'��!;�!&�(�� � ����'��5�!I�"$�g��0�/�.�7
�6�G�2�c�U�!�$������+�+�W�I�6��u�+��C�y�1�	3�����+�+�W�I�e�D��u�+��C�y�1�	3�������'��3��	 �������'��5�A��g��	(�A��I������+�+�W�I�6��8I�J�����+�+�W�I�e�D��FW�X�������'��3�_�E�������'��5�A��g��	(�.��8������+�+�W�I�6��8I�J�����+�+�W�I�e�D��FW�X�������'��3�_�E�������'��5�A��g��	(�.������+�+�W�I�6���@�����+�+�W�I�e�D�M�	O�������'��3�U�;�������'��5�A��g��	(�Q������+�+�W�I�6�:�:�<�	=�	
����+�+�W�I�e�D�:�:�<�	=�	
������'��3�U�;�������'��5�A��g��	(�	
������<�<�d�C�/�.�.�s�*B$S	�S-
�$S-
c�>�Q,Q
,1Q,Q,1QQ,QQ,1Q,Q,1Q,Q,1Q,,QN1Q,Q,1Q,Q,1Q,Q,1Q	,QQ,11
FDvvqUOUQ
59^tt^2UO[OU2U2UO[OUP
Q5U2PPP2Jx	Q,oUO[OU2Q,2UO[OUP
Q5,QN2P!)%fhJ�9h)u&"Sürname, Firstname" <to@example.com>zfoo: ;z#"Jason R. Mastaler" <jason@dom.ain>z=Pete(A nice \) chap) <pete(his account)@silly.test(his host)>z<(Empty list)(start)Undisclosed recipients  :(nobody(I know))z=Mary <@machine.tld:mary@example.net>, , jdoe@test   . examplez*John Doe <jdoe@machine(comment).  example>z3"Mary Smith: Personal Account" <smith@home.example>zUndisclosed recipients:;z7<boss@nil.test>, "Giant; \"Big\" Box" <bob@example.net>)�	addressesr�z	[]*-- =~$)uSürname, Firstnamer�rY)zJason R. Mastalerz
jason@dom.ain)z)Pete (A nice ) chap his account his host)zpete@silly.test))�Maryzmary@example.netrY)r;zjdoe@test.example)zJohn Doe (comment)zjdoe@machine.example)zMary Smith: Personal Accountzsmith@home.example)r;z
boss@nil.test)zGiant; "Big" Boxzbob@example.net)rYrY)r;z*--)r[r1r"r�)r5r�rs&  r8�test_getaddresses_nasty�)TestMiscellaneous.test_getaddresses_nasty�
s���6�
7�7�
8�
:��Z��Z�
��=�
>��>�
?�
A�O�
O�N�
O�
Q�M�
M��Z�
�N�
N�
P�
R�;�
;�<�
=�
?�D�
D�D�
E�
G�)�
)��Z�
�I�
I�#�%L�
M�
O�9$
��I�>���	��2�2�� � ��!3�!3�I�!>�!)�+�� � ��!3�!3�I�e�!L�!)�+�3�2�?$
�J!�M�	�����+�+�I�6�"��	%�����+�+�I�e�D�:�	<�3�2�2�s�AD	�D
�D
c�|�UOo[OQ,2oUU]*]*Q2P!)z(Test proper handling of a nested commentz%User ((nested comment)) <foo@bar.com>�foo@bar.comr�)r5r6�addrss&  r8�"test_getaddresses_embedded_comment�4TestMiscellaneous.test_getaddresses_embedded_comment�
s3��
�
�
���"�"�$K�#L�M��
�5��8�A�;�
�&r;c��[O[Q2,2oUOU]*]*Q2P!)z%Test the handling of a Header object.zAl Person <aperson@dom.ain>r)r"r�r
r1)r5r�s& r8�test_getaddresses_header_obj�.TestMiscellaneous.test_getaddresses_header_obj�
s4���"�"�F�+H�$I�#J�K������q��!��&7�8r;�cpuc��QQ[2o[]2Tt,tFD	p!2MJ	oo[OU29^tt^2PPP2[	STt,tFDpDO
MJ	to,2oUO
[[U22[U22P!ttoh)%fhKj9httoh)c�(`�\sQsQsnQsQsUsP!)�BTestMiscellaneous.test_make_msgid_collisions.<locals>.MsgidsThreadi�
c���,UmUOOo[Oo[O
oU2Q*oU2U6cUUQQ52JP!)g@�testdomain-string��domain)�msgidsr�r"�
make_msgidr��	monotonic)r5r�r��clock�tfins&    r8�run�FTestMiscellaneous.test_make_msgid_collisions.<locals>.MsgidsThread.run�
sS�� ������+�+��"�-�-�
������w��}���g��n��:�-@�A�B�%r;)r�)rgrhrirjr�rkrlrms@r8�MsgidsThreadr��
s����
C�
Cr;r�)	rr�r$�
start_threads�sumr�r1r^r_)r5r�r��threadsr;�all_idss&     r8�test_make_msgid_collisions�,TestMiscellaneous.test_make_msgid_collisions�
s���		C�6�		C�,1��8�4�8�a�<�>�8��4�
�
+�
+�G�
4�
4��5���1��A�x�x��1�2�6������S��\�*�C��L�9��	5�
4�
4��1s�B-�B2� C�2C	�;C	c��UOo[2oUOQQQQ5UUO2Q2P!)r�r�zfoo\wacky"namer�)r1rr�r�r4s&  r8�test_utils_quote_unquote�*TestMiscellaneous.test_utils_quote_unquote�
sA��
�
�
���i�����,�l� 1�	�	3�
�3����0�1r;c�^�[Q2oUOUO2Q2P!)z
not a charsetrZ�r	r1�get_body_encoding�r5rAs& r8�)test_get_body_encoding_with_bogus_charset�;TestMiscellaneous.test_get_body_encoding_with_bogus_charset�
s%���/�*������2�2�4�h�?r;c��UOo[2oQUQ$UUQ*Q2UO2oU[U2]2UU]*Q2[	U]*2oUUO2Q2UO
QUQ5UUO2Q2UUOP	Q5Q2UUQ	*Q2[2oQ
UQ$UO2oU[U2]2UU]*Q2[	U]*2oUUO2[O2UO
QUQ5UUO2Q2UUQ	*Q
2P!)ztext/plain; charset=UTF-8rDr@rYrZr�r��aGVsbG8gd29ybGQ=
r[rBztext/plain; charset="US-ASCII"rOr�r)
r1rr}r^r	r�rTr]rr�)r5r6r7r~rAs&    r8�-test_get_body_encoding_with_uppercase_charset�?TestMiscellaneous.test_get_body_encoding_with_uppercase_charset�
sS��
�
�
���i��9��N��
�3�~�� ;�<��#�#�%��
�3�x�=�!��
�8�A�;�� ��(�1�+�&��
�7�$�$�&��1�������8�
�3�?�?��2�3�
�3�?�?�$�?�'��8�
�3�*�+�X�6��i��>��N���#�#�%��
�3�x�=�!��
�8�A�;�
�#��(�1�+�&��
�7�$�$�&��(?�(?�@����
�w��7�
�3�?�?��m�,�
�3�*�+�V�4r;c��[Q2o[Q2oUOUO2UO22P!)rOr{r�)r5�lc�ucs&  r8�test_charsets_case_insensitive�0TestMiscellaneous.test_charsets_case_insensitives8��
�Z�
 ��
�Z�
 ������-�-�/��1E�1E�1G�Hr;c��UOoUOQ2o[2o[OV#2UUO2Q2P!)r�aBmultipart/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
rFrHs&   r8�1test_partial_falls_inside_message_delivery_status�CTestMiscellaneous.test_partial_falls_inside_message_delivery_statussG��
�
"�
"��
�l�l�<�(���j�����S�&�
�3�<�<�>��	r;c�n�UO[OOQQ5QPQ2P!)r�r�z@testdomain-string>i���r1r�r"r�rMs&r8�test_make_msgid_domain�(TestMiscellaneous.test_make_msgid_domain5s0������K�K�"�"�*=�"�>�s�t�D�!�	#r;c�p�UO[OOQQQ5QPQ2P!)z
test-idstringr�)�idstringr�z!.test-idstring@testdomain-string>i���r�rMs&r8�test_make_msgid_idstring�*TestMiscellaneous.test_make_msgid_idstring:s9������K�K�"�"�O�*�
#�
,�,/�D�
2�/�	1r;c���[Q29^tt^2oQ9UmoUO[OO2QU*Q*2PPP2P!)%fhP!9h)zsocket.getfqdnzpythontest.example.comr�rL)r�return_value�assertEndsWithr�r"r�)r5�mock_getfqdnr�s&  r8�test_make_msgid_default_domain�0TestMiscellaneous.test_make_msgid_default_domain@sR��
�#�
$�
$��1I�I�L�%�������� 6� 6� 8�#��,��:L�M�%�
$�
$�
$�s�AA%�%A6	�.A6	c��[QQQQ59^tt^2oUO2oPPP2WOQQ2o[OU2o[2o[OOU2oUOU2UOUO2U2P!)%fhK�9h)�
msg_26.txtrYr*�r��newliner�)r'r�rr�rrr�r
r�r1r��r5�f�msgtxt�	msgtxt_nlr7r�r�s&      r8�test_Generator_linend�'TestMiscellaneous.test_Generator_linendEs���
�l�W�d�
C�
C�q��V�V�X�F�D��N�N�6�4�0�	��'�'��/���J���O�O�%�%�a�(��	�	�	�#���������y�1�D�
C�s�B5�5C	�>C	c��[QQQQ59^tt^2oUO2oPPP2WOQQ2o[OU2o[2o[OOU2oUOUQQ5UOUO2OQ2U2P!)%fhK�9h)r�rYr*r�r�r�r�)r'r�rr�rrr�rr�r1r�r\r�s&      r8�test_BytesGenerator_linend�,TestMiscellaneous.test_BytesGenerator_linendPs���
�l�W�d�
C�
C�q��V�V�X�F�D��N�N�6�4�0�	��'�'�	�2���I���O�O�*�*�1�-��	�	�	�#�v�	�&��������,�,�W�5�v�>�D�
C�s�C�C	�C	c��[QQ29^tt^2oUO2oPPP2WOQQ2oUOQQ2o[OU2o[2o[OOU2oUOUQQ5UOUO2U2P!)%fhK�9h)r�rtswith attachmentsfo��
r
r�r�)r'r�rr�r�rr�rr�r1r�r�s&      r8�)test_BytesGenerator_linend_with_non_ascii�;TestMiscellaneous.test_BytesGenerator_linend_with_non_ascii[s���
�l�D�
)�
)�Q��V�V�X�F�*���� 2�I�>���N�N�7�E�2�	��&�&�y�1���I���O�O�*�*�1�-��	�	�	�#�v�	�&��������v�.�*�
)�s�C�C	�C	c	��[QQ29^tt^2oUO2oPPP2[QQ29^tt^2oUO2oPPP2[Q1[W11[W11[
[
211[Q1[Q1,oSFD�vqVUOUOQQ59^tt^2UUoUOUO[OO2PPP2UOUOQQ59^tt^2UUQ[OO-oUOUO[OO2PPP2J�	P!)%fhCKo9h)%fhCKV9h)%fhK�9h)%fhCJD9h)	r�rtrsr,)�clsr�r+r��r;rX)r'r�rrrrrrrr[rgr�r�r�r,r+)r5r��	audiodatary�classesr�constructorr�s&       r8�!test_mime_classes_policy_argument�3TestMiscellaneous.test_mime_classes_policy_argumentgsX��
�k�4�
(�
(�B����	�I�)�
�l�D�
)�
)�R��g�g�i�G�*��e�$�
���%�
��
�#�
�7�9�,�'�
�5�6�
�u��

��!(��C����#�,�,�z��B�B���%���
�
�a�h�h����(=�(=�>�C����#�,�,�y��A�A���B�U�\�\�-A�-A�B���
�
�a�h�h����(<�(<�=�B�A�	!(�)�
(�
(��
)�
)�
)��C�B��B�A�A�sH�F
�F!�<F5	�)AG	�
F	�F	�!F2	�*F2	�5G
�>G
�G
�G
c���UO[[OQ22,QN2UO[[OQ22QQ,2P!)za\\b\"c\\"dza\�rr�)r
)r��\\)r�r_)r�z\")r��c)�r)rr�)�
�d)r��\)r1r�r"�_iter_escaped_charsrMs&r8�test_iter_escaped_chars�)TestMiscellaneous.test_iter_escaped_chars|sQ������e�7�7��G�H�%�	&�	
����e�7�7��>�?�"�I�.�	0r;c�`�U1QkoUQQ2UQQ2UQQ2UQQ2UQ	Q
2UQQ2UQ
Q2UQP2QFD)oRO[OU2U2J+	P!)c�V:�RO[OU2U2P!rl�r1r"�_strip_quoted_realnames)r>rr5s&&�r8�check�<TestMiscellaneous.test_strip_quoted_realnames.<locals>.check�s������U�:�:�4�@�(�Kr;r�z( <jane@example.net>,  <john@example.net>z""Jane \"Doe\"." <jane@example.net>z <jane@example.net>zbefore"name"after�beforeafterzbefore"name"�beforezb"name"r_z"name"after�afterz"name"ar�z"name")z8Jane Doe <jane@example.net>, John Doe <john@example.net>zlone " quoter)r5rr>sf  r8�test_strip_quoted_realnames�-TestMiscellaneous.test_strip_quoted_realnames�s����	L�	�L�8�	:�
�3�#�	%�	�"�M�2�
�o�x�(�
�j�#��
�n�g�&�
�j�#��
�i���
�D�
���U�:�:�4�@�$�G�	
r;c��QoUO[OUQ022UO[OUQ022UO[OUQ022UO[OUQ022UO[OQU022P!)zalice@example.netz (Alice)z )Alice(z	 (Alice))z	 ((Alice)z")Alice((" )r
r"�_check_parenthesisr�rZs& r8�test_check_parenthesis�(TestMiscellaneous.test_check_parenthesis�s���"������0�0�D�6��1B�C�D�����1�1�T�F�(�2C�D�E�����1�1�T�F�)�2D�E�F�����1�1�T�F�)�2D�E�F�	
����0�0�;�t�f�1E�F�Gr;rf)Ergrhrirjr�r�r�r�r�r�r�r�r�r�r�r�r�r�rr	r
rrrrr%r)r/r5r9rArOrUr[r_rerkrqrtrxr�r�r�r�r�r�r�r$�requires_working_threadingr#�requires_resourcer�r�r�r�r�r�r�r�r�r�r�r�rrrr!rkrlrms@r8r�r��sr����	-�
1�6�"6�.��/�
%�J�4�,D�7�6�7�
6�9�C�C�	8�E�K�F�
�/�
	L�L��
��J�6�;�$>�$:�M�3�
�(0�
�"VD�p*<�X'�9�
�0�0�2����u�%�:�&�3�:�&2�@�5�4I�
(�T#�
1�N�
	2�	?�
/�>�*0�H�2H�Hr;r�c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�
TestIteratorsi�c�T�UOoUOoUOQ2o[OU2o[U2oU[
U2]2U[OU2UO22UOQ2o[OU2o[U2oU[
U2]+2[QQQ59^tt^2oU[OU2UO22PPP2P!)%fhP!9h)r�rYz
msg_19.txtrYr�)r1r�r2r �body_line_iteratorr�r^�EMPTYSTRINGr�r]r'r�)r5r6rdr7�itr�r�s&      r8�test_body_line_iterator�%TestIterators.test_body_line_iterator�s���
�
�
���#�#���l�l�<�(��
�
)�
)�#�
.���R���
�3�u�:�q���K���U�#�S�_�_�%6�7��l�l�<�(��
�
)�
)�#�
.���R���
�3�u�:�r��
�l�W�
5�
5���� � ��'�����3�6�
5�
5�
5�s�!+D�D'	�D'	c�&�UOoUOQ2o[OUQ2o,o]oSFD+oU]*
oUO	UO22J-	UU]2U[OU2Q2P!)r�r�z`a simple kind of mirror
to reflect upon our own
a simple kind of mirror
to reflect upon our own
�r1r2r �typed_subpart_iteratorr�r]r)r��r5r6r7r*r��subpartsr�s&      r8�test_typed_subpart_iterator�)TestIterators.test_typed_subpart_iterator�s���
�
�
���l�l�<�(��
�
-�
-�c�6�
:�������G���M�H��L�L��,�,�.�/��	�8�Q��
�;���E�"�%�	r;c�(�UOoUOQ2o[OUQQ2o,o]oSFD+oU]*
oUO	UO22J-	UU]2U[OU2Q2P!)r�r�r�z%
Hi,

Do you like this message?

-Me
r.r0s&      r8�(test_typed_subpart_iterator_default_type�6TestIterators.test_typed_subpart_iterator_default_type�s���
�
�
���l�l�<�(��
�
-�
-�c�6�7�
C�������G���M�H��L�L��,�,�.�/��	�8�Q��
�;���E�"�%�	r;c���,QNo]QHGoGoU2o,o]oSFDivqxUOU2Vh*
o]o	[	UO
U2FDo
UO
U
2U	]*
o	J	UOV�2Jk	UO[U2U2SOPOSTTt,tFDvqxUMJ		too2POU22P!ttooh)z�FeedParser BufferedSubFile.push() assumed it received complete
line endings.  A CR ending one push() followed by a LF starting
the next push() added an empty line.
��BufferedSubFile�NeedMoreData))za
 
r�)r_r)zc
r�)r;r)zd
r�)ze
r)z
fr�)r�r�)
�email.feedparserr9r:�push�iter�readliner�r1r^r�)r5�imtr9r:�bsf�om�nt�il�n�n1�ols&          r8�test_pushCR_LF�TestIterators.test_pushCR_LF�s���
	��	C����
��
���E�B��H�H�R�L��G�B��B��3�<�<��6���	�	�"�
��a���7�
���Q�#��	
����R��"�%�������#�!6�#���"�#�!6�7������E��!6s�>C+c�`�]QHGoGoQo]oQnPOU1Qk[	U222Q*oUOP	2oU2o,o[	][
U2U2FDCo	VYV�*o
UOU
2UO[UOU22JE	UOV�2P!)rr8i'zabcd 	
c3�F:�SF �Do[R2w�	J	P!3hrlr)r�r��charss& �r8r��1TestIterators.test_push_random.<locals>.<genexpr>	s��8���8�a�F�5�M�M�8�s�!r*)r;r9r:r�r�r�r^r<�extendr=r>r1)r5r9r:rD�	chunksizer��targetr@r�r��chunkrKs&          @r8�test_push_random�TestIterators.test_push_randoms����B����	����G�G�4�5��8�4�4�t�;�����d�#��������q�#�a�&�)�,�A����$�E��H�H�U�O��L�L��c�l�l�L�9�:�-�	
����'r;rf)rgrhrirjr+r2r5rGrQrkrlrms@r8r&r&�s$����4�"�"�&F�<(�(r;r&c�:`�\sQsQsnQsQsQsQsQsUs	P!)�TestFeedParsersic�n�[2oSFDoUOU2J	UO2!rl)r)�feed�close)r5�chunksr�rPs&&  r8�parse�TestFeedParsers.parses.���\�
��E��O�O�E�"�����!�!r;c��UOQ2oUOUQ*Q2UOUQ*Q2P!)zFirst: val
: bad
Second: valr��valr�)rYr1rns& r8�test_empty_header_name_handled�.TestFeedParsers.test_empty_header_name_handleds9���j�j�9�:������W��u�-�����X���.r;c���UOQ,2oUOUO2,QN2UOQ,2oUOUO2,QN2UOQQ,2oUOUO2QQ,2UOQQ,2oUOUO2QQ,2UOQQ	,2oUOUO2QQ,2UOQ
,2oUOUO2Q,2UO,Q
N2oUOUO2QQ,2P!)z
a:
b:
c:
d:
r�r_za:
b:
c:
d:za:
b�c:
�bc�a:
zb:
z
b:
ua:…b:
c:
)r�r_rr)r�u	…b:
c:)rbub:…r`�r�r;)r_u…c:)rYr1r�r�rZs& r8�
test_newlines�TestFeedParsers.test_newlines#s3���J�J�,�-�.���������#7�8��J�J�*�+�,���������#7�8��J�J���(�)���������C��;�/��J�J���'�(���������C��:�.��J�J���)�*���������C��:�.�
�J�J�,�-�.���������%<�$=�>��J�J�1�2���������Y��$@�Ar;c��QQq!UOQ,QU*,U**2oUOUO2Q	,2UOUO2QU*U*2UOQ,QU*,U**2oUOUO2Q	,2UOUO2QU*U*2UOQ,QU*Q*,U**2oUOUO2Q	,2UOUO2QU*Q*U*2UOQQ,QU*,U**2oUOUO2Q
QQU*U*1,2P!)��i Nza:b

r
r_za:b

�…rbzb: )r�r_rc)rYr1r�r])r5�MrWr�s&   r8�test_long_lines�TestFeedParsers.test_long_lines5sZ���U�1��J�J�	�{�c�!�e�W�q�[�0�1���������Z�L�1��������#�a�%��'�2��J�J�	�{�c�!�e�W�q�[�0�1���������Z�L�1��������#�a�%��'�2��J�J�	�{�c�!�e�F�l�^�a�%7�7�8���������Z�L�1��������3�q�5��<��*:�;��J�J����#�a�%��1��4�5���������Y��c�!�e�A�g��$?�@r;rf)
rgrhrirjrYr]rdrjrkrlrms@r8rTrTs!����"�/�B�$
A�
Ar;rTc�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsPsQ
sQsQsQsQsQsQsQsUsP!)�TestParsersiEc��UOo[QQQ59^tt^2o[2OU2oPPP2UWQ*Q2UUQ*Q2UUO	2Q2UOUO
22UOUO2[2P!)%fhK�9h)rYrYr�r��ppp-request@zzz.orgr��ppp@zzz.orgrr)
r1r'rrYrHr�r�r	r]r��r5r6r�r7s&   r8�test_header_parser�TestParsers.test_header_parserGs���
�
�
��
�l�W�
5�
5���.�&�&�r�*�C�6�
�3�v�;�-�.�
�3�t�9�m�$�
�3���!�#4�5�����)�)�+�,����c�o�o�/��5�
6�
5�s�C�C	�
C	c��UOo[QQ29^tt^2o[OO	2OU2oPPP2UWQ*Q2UUQ*Q2UUO
2Q2UOUO22UOUO2[2UOUOP	Q5[2P!)%fhK�9h)rYrtr�ror�rprrr[)
r1r'r�r�r�rYrHr�r�r	r]r�rrqs&   r8�test_bytes_header_parser�$TestParsers.test_bytes_header_parserRs���
�
�
��
�l�D�
)�
)�R��,�,�0�0�2�8�8��<�C�*�
�3�v�;�-�.�
�3�t�9�m�$�
�3���!�#4�5�����)�)�+�,����c�o�o�/��5����c�o�o�T�o�:�E�B�*�
)�s�.C:�:D
	�D
	c�X�[QQQ59^tt^2oUO2oPPP2[OO	[O
OQ5oUOWP	Q5oUOUO,2P!)%fhKy9h)z
msg_47.txtrYr�r�)�headersonly)
r'r�r�r�rr�r+r�r1r
)r5r�r�r��
parsed_msgs&    r8�%test_header_parser_multipart_is_valid�1TestParsers.test_header_parser_multipart_is_valid^su��
�l�W�
5�
5���g�g�i�G�6����$�$�E�L�L�,@�,@�$�A���_�_�W�$�_�?�
�����+�+�R�0�
6�
5�s�B�B)	�"B)	c��[QQ29^tt^2o[OO2O	U2UOUO2PPP2P!)%fhP!9h)rYrt)r'r�r��BytesParserrYr��closedr�s& r8�%test_bytes_parser_does_not_close_file�1TestParsers.test_bytes_parser_does_not_close_filehsM��
�l�D�
)�
)�R��L�L�$�$�&�,�,�R�0����R�Y�Y�'�*�
)�
)�
)�s�A	A)�)A:	�2A:	c	�|�[QQ29^tt^2o[OOoUO	[O
OU[OOQ5OU2UOUO2PPP2P!)%fhP!9h)�
msg_15.txtrtr�)r'r�r�r}r�rrur�r�rYr�r~)r5r��bytesParsers&  r8�2test_bytes_parser_on_exception_does_not_close_file�>TestParsers.test_bytes_parser_on_exception_does_not_close_filemsx��
�l�D�
)�
)�R��,�,�2�2�K����e�l�l�F�F�)����1D�1D�E�K�K� �
"�
���R�Y�Y�'�*�
)�
)�
)�s�B
B*�*B;	�3B;	c��[QQQ59^tt^2o[OO2O	U2UOUO2PPP2P!)%fhP!9h)rYrYr�)r'r�r�rrYr�r~r�s& r8�test_parser_does_not_close_file�+TestParsers.test_parser_does_not_close_fileusM��
�l�W�
5�
5���L�L���!�'�'��+����R�Y�Y�'�6�
5�
5�
5�s�A	A*�*A;	�3A;	c	�~�[QQQ59^tt^2o[OOoUO	[O
OU[OOQ5OU2UOUO2PPP2P!)%fhP!9h)r�rYr�r�)r'r�r�rr�rrur�r�rYr�r~)r5r�r�s&  r8�,test_parser_on_exception_does_not_close_file�8TestParsers.test_parser_on_exception_does_not_close_filezsv��
�l�W�
5�
5���\�\�(�(�F����e�l�l�F�F�$�E�L�L�,?�,?�@�F�F��
L����R�Y�Y�'�	6�
5�
5�
5�s�B
B+�+B<	�4B<	c��UOo[OQ2oUUQ*Q2UUQ*Q2UUO2Q2P!)z�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��!the next line has a space on it
 r�spam�Here's the message body
�r1r�rr]r4s&  r8�test_whitespace_continuation�(TestParsers.test_whitespace_continuation��V��
�
�
���'�'�	)�	��	�3�y�>�?�@�
�3�|��f�%�
�3�?�?��9�:r;c��UOo[OQ2oUUQ*Q2UUQ*Q2UUO2Q2P!)z�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�r�rr�r�r�r4s&  r8�(test_whitespace_continuation_last_header�4TestParsers.test_whitespace_continuation_last_header�r�r;c���UOo[QQQQ59^tt^2o[2OU2oPPP2U[	WO22]2UO]2oUUO
2Q2UUO2Q2UO]2oUUO
2Q2P!)%fhK�9h)r�rYr*r�r?z!Simple email with attachment.

zapplication/riscos)r1r'rrYr^r]rH)r5r6r�r7�part1�part2s&     r8�test_crlf_separation� TestParsers.test_crlf_separation�s���
�
�
��
�l�W�d�
C�
C�r��(�.�.��$�C�D�
�3�s��� �!�1�%�����"��
�5�!�!�#�\�2�
�5���� G�H�����"��
�5�!�!�#�%9�:�D�
C�s�C�C	�C	c�H�[QQQQ59^tt^2oUO2oPPP2[OW2o[	2o[U2oUO
UQQ5UOUO2U2P!)%fhKp9h)r�rYr*r�r�r�r�r�s&     r8�test_crlf_flatten�TestParsers.test_crlf_flatten�st��
�l�W�d�
C�
C�r��7�7�9�D�D��'�'��-���J���a�L��	�	�	�#�v�	�&��������t�,�
D�
C�s�B�B!	�B!	c�
�UOoUOo[QQQ59^tt^2o[OU2oPPP2UWO2]2U[
UO22]2UO]2oUUO2Q2UUO2]2U[
UO22]2UO]2oUUO2]2UUO2Q2UUO2Q2UO]2oUUO2Q2UUO2]2U[
UO22]2UO]2oUUO2]2UUO2Q2UUO2Q2P!)%fhCK�9h)r�rYr�r�r?r r!)	r1r�r'r�rr�r^r]rH)	r5r6rdr�r7r��part1ar��part2as	&        r8�-test_multipart_digest_with_extra_mime_headers�9TestParsers.test_multipart_digest_with_extra_mime_headers�s���
�
�
���#�#��
�l�W�
5�
5���)�)�"�-�C�6�	�3����q�!�
�3�s��� �!�1�%�����"��
�5�!�!�#�%5�6�
�5�����#�
�3�u� � �"�#�Q�'��"�"�1�%��
�6��� �!�$�
�6�"�"�$�l�3��F��� �-�0�����"��
�5�!�!�#�%5�6�
�5�����#�
�3�u� � �"�#�Q�'��"�"�1�%��
�6��� �!�$�
�6�"�"�$�l�3��F��� �-�0�56�
5�
5�s�G1�1H	�:H	c��,QNo[O[OU22oUO	UQ*Q2P!)�$From: Andrew Person <aperson@dom.ain�datezTue, 20 Aug 2002 16:43:45 +1000)r�z
Subject: Testz%Date: Tue, 20 Aug 2002 16:43:45 +1000)r�rr�r�r1)r5r�r7s&  r8�test_three_lines�TestParsers.test_three_lines�s8��:���'�'������7������V��&G�Hr;c���UOoQoQoQU8QU8Q0o[OU2oUUOQ2U2UUOQ2U2P!)r�z	more textzHeader: z
Next-Header: z

Body

r
zNext-Header)r1r�r�get)r5r6�value1�value2r�r7s&     r8�3test_strip_line_feed_and_carriage_return_in_headers�?TestParsers.test_strip_line_feed_and_carriage_return_in_headers�sY��
�
�
�������F�
���'�'��*��
�3�7�7�8��f�%�
�3�7�7�=�!�6�*r;c���UOoQo[OU2oU[U2]2U[	QU22,QN2UUO2Q2P!)z(>From: foo
From: bar
!"#QUX;~: zoo

bodyc3�0�SF �Dpw�	J		P!3hrlrf)r��fields& r8r��9TestParsers.test_rfc2822_header_syntax.<locals>.<genexpr>�s��S���S�E�%�S����body)z!"#QUX;~z>Fromr�)r1r�rr^r�r]r?s&   r8�test_rfc2822_header_syntax�&TestParsers.test_rfc2822_header_syntax�sV��
�
�
��:���'�'��*��
�3�s�8�Q��
�6�)�S�)�)�+H�I�
�3�?�?��f�%r;c��UOoQo[OU2oU[UO	22]2P!)z<>From foo@example.com 11:25:53
From: bar
!"#QUX;~: zoo

body)r1r�rr^r�r?s&   r8�(test_rfc2822_space_not_allowed_in_header�4TestParsers.test_rfc2822_space_not_allowed_in_header�s6��
�
�
��N���'�'��*��
�3�s�x�x�z�?�A�r;c���UOoQo[OU2oUO2oUO	2UU,QN2UUO2Q2P!)z7A: first header
B: second header
CC: third header

bodyr�)�A�B�CC)r1r�rr��sortr])r5r6r�r7�headerss&    r8�!test_rfc2822_one_character_header�-TestParsers.test_rfc2822_one_character_header�sR��
�
�
��I���'�'��*���(�(�*������
�7�$�%�
�3�?�?��f�%r;c��Qo[OU2oUOUO]2O2Q2P!)z�From: foo@bar.com
To: baz
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=BOUNDARY

--BOUNDARY
Content-Type: text/plain

body ending with CRLF newline

--BOUNDARY--
r�)r�rr�r]�r5r�r7s&  r8�test_CRLFLF_at_end_of_part�&TestParsers.test_CRLFLF_at_end_of_parts@��

�	
��'�'��*�����C�O�O�A�.�:�:�<�f�Er;rf)rgrhrirjrrrurzrr�r�r�r�r�r�r�rIr�r�r�r�r�r�r�rkrlrms@r8rmrmEso����	6�
C�1�(�
(�(�
(�;�$;�$	;�-��G�1�>I�	+�&��&�F�Fr;rmc	�`�\sQsQsn\O
Q2sQsQsQs	Qs
QsQsQ	s
Q-sQ
O\TTt,tFDvqUMJ		too2Q*O!Q2sQ
sQsQsQsQsQsQsQsQsQsQs\O
Q2O!Q2sQsQs\O
Q2s Qs!Qs"Qs#\ OIQ
2s%Q,\%Q $Q
O\%2s%Q!s&\O
Q"2O!Q#2s'\O
Q$2s(Q%s)Q&s*Q's+Q(s,Q)s-Q*s.Q+s/Ps0Q,s1Us2P!ttooh).�Test8BitBytesHandlingiz�        From: foo@bar.com
        To: baz
        Mime-Version: 1.0
        Content-Type: text/plain; charset={charset}
        Content-Transfer-Encoding: {cte}

        {bodyline}
        c�0�UOOQQQQ5OQ2o[OU2oUOUO
2Q2UOUO
P	Q5QOQ22P!)rYrd�pöstal�rAr��bodyline�pöstal
r[��bodytest_msgrEr�r�r�r1r]r�s&  r8�test_known_8bit_CTE�)Test8BitBytesHandling.test_known_8bit_CTE,s������$�$�W�)/�.7�
%�
9�9?����	
��&�&�q�)��������*�K�8���������5�$�+�+�G�4�	6r;c�0�UOOQQQQ5OQ2o[OU2oUOUO
2Q2UOUO
P	Q5QOQ22P!)�notavalidcharsetrdr�r�rYup��stal
r[r�r�r�s&  r8�test_unknown_8bit_CTE�+Test8BitBytesHandling.test_unknown_8bit_CTE5s������$�$�-?�)/�.7�
%�
9�9?����	
��&�&�q�)��������*�,A�B���������5�$�+�+�G�4�	6r;c�0�UOOQQQQ5OQ2o[OU2oUOUO
2Q2UOUO
P	Q5QOQ22P!)rYrC�p=C3=B6stálr�u
p=C3=B6stál
r[�	pöstál
r�r�s&  r8�test_8bit_in_quopri_body�.Test8BitBytesHandling.test_8bit_in_quopri_body>s���
���$�$�W�);�.<�
%�
>�>D�f�W�o�	
��&�&�q�)��������*�,<�=���������5�%�,�,�W�5�	7r;c�0�UOOQQQQ5OQ2o[OU2oUOUO
2Q2UOUO
P	Q5QOQ22P!)r�rCr�r�rYup=C3=B6st��l
r[r�r�r�s&  r8�.test_invalid_8bit_in_non_8bit_cte_uses_replace�DTest8BitBytesHandling.test_invalid_8bit_in_non_8bit_cte_uses_replacePs���
���$�$�W�);�.<�
%�
>�>D�f�W�o�	
��&�&�q�)��������*�,F�G���������5�$�+�+�G�4�	6r;c�R�UOOQQQQ5OQ2o[OU2oUOUO
P	Q5QOQ22UOUO]*[O2P!)rYrZu
cMO2c3RhbAá=r�r[r�)r�rEr�r�r�r1r]r	r
rrr�s&  r8�test_8bit_in_base64_body�.Test8BitBytesHandling.test_8bit_in_base64_body`s���
���$�$�W�)1�.=�
%�
?�?E�v�g��	
��&�&�q�)����������5�"�)�)�'�2�	4����c�k�k�!�n�$�B�B�	Dr;c���UOOQQQQ5OQ2o[OU2oUOUO
P	Q5QOQ22P!)rYr�u
<,.V<W1A; á r�r[u<,.V<W1A; á 
r�r�s&  r8�test_8bit_in_uuencode_body�0Test8BitBytesHandling.test_8bit_in_uuencode_bodymsn��
���$�$�W�)3�.=�
%�
?�?E�v�g��	
��&�&�q�)����������5�*�1�1�'�:�	<r;c� �[OQ2OQ2o[OU2oUOUO
2Q2UOUO
P	Q5QOQ22P!)u�        From: foo@bar.com
        To: baz
        Mime-Version: 1.0
        Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8
        Content-Transfer-Encoding: 8bit

        pöstal
        rYr�r[)r�r�r�r�r�r1r]r�s&  r8�test_rfc2231_charset_8bit_CTE�3Test8BitBytesHandling.test_rfc2231_charset_8bit_CTEwsu���O�O��

��V�G�_�	
��&�&�q�)��������*�K�8���������5�$�+�+�G�4�	6r;r*z
Yes, they are flying.
rYc���[OUO2oUO[	UOQ22Q2UO[	UQ*2Q2P!)r��b��z)r�r��headertest_msgr1r�r�rns& r8�test_get_8bit_header�*Test8BitBytesHandling.test_get_8bit_header�sO���&�&�t�':�':�;������S�W�W�T�]�+�-=�>�����S��Y��)9�:r;c��[OUO2oSO[	U2[
OQ2OUOTTt,tFDvq#U]*MJ	too2P!ttooh)z�                            From: {}
                            To: {}
                            Subject: {}
                            From: {}

                            Yes, they are flying.
                            )	r�r�r�r1r�r�r�rE�headertest_headers)r5r7�_rs&   r8�test_print_8bit_headers�-Test8BitBytesHandling.test_print_8bit_headers�s����&�&�t�':�':�;������S��!���* �!�"(��(�)-�(?�(?�*A�(?�;H�1�(�1�+�+�(?�*A�B�		C��*As�%Bc	���[OUO2oSOUO	2Tt,tFDo[U2MJ	to,QN2P!ttoh)r�)r�r��]Maintenant je vous pr��sente mon coll��gue, le pouf c��l��bre
	Jean de Baddie�	g��st)r�r�r��assertListEqualr�r��r5r7r
s&  r8�test_values_with_8bit_headers�3Test8BitBytesHandling.test_values_with_8bit_headers�sI���&�&�t�':�':�;�����c�j�j�l�;�l��c�!�f�l�;�2�	3��;s�A c���[OUO2oSOUO	2TTt,tFDvq#[U2[U21MJ	too,QN2P!ttooh)r�)�r�r�)r�r�)rXr�)r�r�)r�r�r�r�r�r�)r5r7r
r^s&   r8�test_items_with_8bit_headers�2Test8BitBytesHandling.test_items_with_8bit_headers�sT���&�&�t�':�':�;�����S�Y�Y�[�I�[�6�A�s�1�v�s�1�v�.�[�I�<�	=��Is�#A/
c	���[OUO2oSOUO	Q2Tt,tFDo[U2MJ	toQQ,2P!ttoh)r�r�r�)r�r�r�r�r3r�r�s&  r8�test_get_all_with_8bit_headers�4Test8BitBytesHandling.test_get_all_with_8bit_headers�sT���&�&�t�':�':�;�����c�k�k�&�.A�B�.A��c�!�f�.A�B�,�0�2�	3��Bs�A!c�:�[O[OQ2O	Q22oUOUO
2Q2UOUO2Q2UOUO2Q2P!)uA            Content-Type: text/pl§in; charset=utf-8
            r9utext/pl�inr�upl�in)	r�r�r�r�r�r1rHr�r�rns& r8�test_get_content_type_with_8bit�5Test8BitBytesHandling.test_get_content_type_with_8bit�sz���&�&�x���8�(���	�"�$��	
����-�-�/�1B�C�����1�1�3�V�<�����0�0�2�L�Ar;c�&�[OQOQ22oUOUO	QQ5,QN2UOUOQQQ5Q2UOUOQQQ5P2P!)u(X-Header: foo=§ne; b§r=two; baz=three
r9r3r4��ne�Fooub§r))r�r)ub�rr8r9)r�r�r�r1r<rIrns& r8�test_get_params_with_8bit�/Test8BitBytesHandling.test_get_params_with_8bit�sz���&�&�;�B�B�9�M�O��������z��:�G�	I�������u�Z��@�*�M�������x�
��C�T�Jr;c��[O[OQ2O	Q22oUOUO
Q2Q2P!)�n            Content-Type: text/plain; charset=us-ascii;
             title*=us-ascii'en'This%20is%20not%20f§nr9�title)rO�enuThis is not f�n)r�r�r�r�r�r1rIrns& r8�!test_get_rfc2231_params_with_8bit�7Test8BitBytesHandling.test_get_rfc2231_params_with_8bit�sL���&�&�x���8<�(��v�i� �"��	
������w�/�6�	8r;c���[O[OQ2O	Q22oUOQQ2UO
UOQ2Q2P!)rr9r�test)r�r�r�r�r�rqr1rIrns& r8�!test_set_rfc2231_params_with_8bit�7Test8BitBytesHandling.test_set_rfc2231_params_with_8bit�sW���&�&�x���8<�(��v�i� �"��	�
�
�g�v�&�������w�/��8r;c��[O[OQ2O	Q22oUOQ2UO
UOQ2P2UO
UO2Q2P!)rr9rr�)	r�r�r�r�r�r|r1rIr�rns& r8�!test_del_rfc2231_params_with_8bit�7Test8BitBytesHandling.test_del_rfc2231_params_with_8bit�sn���&�&�x���8<�(��v�i� �"��	�
�
�g��������w�/��6�����1�1�3�V�<r;c��[O[OQ2O	Q22oUOUO
2Q2UOUO
P	Q5Q2P!)u�            Content-Transfer-Encoding: b§se64
            Content-Type: text/plain; charset=latin-1

            payload
            r9zpayload
r[spayload
)r�r�r�r�r�r1r]rns& r8�%test_get_payload_with_8bit_cte_header�;Test8BitBytesHandling.test_get_payload_with_8bit_cte_header�sb���&�&�x���8�(�
��	�"�$��	
������*�K�8���������5�|�Dr;u0        From: foo@bar.com
        To: báz
        Subject: Maintenant je vous présente mon collègue, le pouf célèbre
        	Jean de Baddie
        Mime-Version: 1.0
        Content-Type: text/plain; charset="utf-8"
        Content-Transfer-Encoding: 8bit

        Да, они летят.
        c��[OUO2o[2o[OOU2O
U2UOUO2UO2P!rl)	r�r��non_latin_bin_msgrr�rr�r1r��r5r7r�s&  r8�test_bytes_generator�*Test8BitBytesHandling.test_bytes_generatorsX���&�&�t�'=�'=�>���i��
���&�&�s�+�3�3�C�8���������)?�)?�@r;c���[OO2o[2o[OOU2O
U2UOUO2Q2P!)r
)	r�r\rrr�rr�r1r�rs&  r8�&test_bytes_generator_handles_None_body�<Test8BitBytesHandling.test_bytes_generator_handles_None_bodysN���m�m�#�#�%���i��
���&�&�s�+�3�3�C�8���������/r;a�        From: foo@bar.com
        To: =?unknown-8bit?q?b=C3=A1z?=
        Subject: =?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue?=
         =?unknown-8bit?q?=2C_le_pouf_c=C3=A9l=C3=A8bre?=
         =?unknown-8bit?q?_Jean_de_Baddie?=
        Mime-Version: 1.0
        Content-Type: text/plain; charset="utf-8"
        Content-Transfer-Encoding: base64

        0JTQsCwg0L7QvdC4INC70LXRgtGP0YIuCg==
        c��[OUO2o[2o[OOU2O
U2UOUO2UO2P!rl)
r�r�rrr�r
r�r1r�� non_latin_bin_msg_as7bit_wrappedrs&  r8�test_generator_handles_8bit�1Test8BitBytesHandling.test_generator_handles_8bitsX���&�&�t�'=�'=�>���j��
���!�!�#�&�.�.�s�3���������)N�)N�Or;c�|�[OUO2o[2o[	U2OU2UO
2o[[22OU2[2o[	U2OU2UOUO
2U2P!rl)
r�r�rrrr�r�r
rr1)r5r7r��
orig_values&   r8�;test_str_generator_should_not_mutate_msg_when_handling_8bit�QTest8BitBytesHandling.test_str_generator_should_not_mutate_msg_when_handling_8bit%s����&�&�t�'=�'=�>���i���s��#�#�C�(��\�\�^�
��(�*��%�%�c�*��i���s��#�#�C�(���������4r;c��[OUO2o[2o[OOU2O
UP	Q5UO2OQ2oUOU]*O2]*Q2UOQOUQ*2UO2P!)Tr�r
sFromr�)r�r�rrr�rr�r�r�r1r�)r5r7r�r�s&   r8�#test_bytes_generator_with_unix_from�9Test8BitBytesHandling.test_bytes_generator_with_unix_from/s����&�&�t�'=�'=�>���i��
���&�&�s�+�3�3�C�$�3�G�����$�$�U�+������q����)�!�,�g�6�������E�"�I�.��0F�0F�Gr;zkSubject: =?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue=2C_le_pouf_c=C3=A9l=C3=A8bre?=:r�r�Nc���QoUO[U2[UQ29^tt^2oUOUO2PPP2[UQ29^tt^2o[
OO2OU2oPPP2UO[W2UO2P!)%fhK�9h)%fhKJ9h)ztest.msg�wbrt)�
addCleanupr&�open�writerr�r�r}rYr1r��non_latin_bin_msg_as7bit)r5r+�testfiler�s&   r8�test_message_from_binary_file�3Test8BitBytesHandling.test_message_from_binary_file@s���
�������#�
�"�d�^�^�x��N�N�4�1�1�2��
�"�d�^�^�x����(�(�*�0�0��:�A������Q���!>�!>�?�	�^��
�^�s#�C�&.C�C	�C	�C&	�C&	u        From: foo@bar.com
        To: Dinsdale
        Subject: Nudge nudge, wink, wink
        Mime-Version: 1.0
        Content-Type: text/plain; charset="latin-1"
        Content-Transfer-Encoding: 8bit

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

        oh l=E0 l=E0, know what I mean, know what I mean?
        c��[OUO2oUO[	U2UO
2P!rl)r�r��
latin_bin_msgr1r��latin_bin_msg_as7bitrZs& r8�:test_string_generator_reencodes_to_quopri_when_appropriate�PTest8BitBytesHandling.test_string_generator_reencodes_to_quopri_when_appropriate_s2���$�$�T�%7�%7�8������Q���!:�!:�;r;c�8�[OUO2o[2o[OOU2O
U2UOUO2UOOQ2Q*2P!)r9r*)
r�r�r3rr�rr�r1r�r\)r5r�r�s&  r8�)test_decoded_generator_emits_unicode_body�?Test8BitBytesHandling.test_decoded_generator_emits_unicode_bodycsm���$�$�T�%7�%7�8���j��
���(�(��-�5�5�a�8�	
����������%�%�i�0��5�	7r;c�F�[OO2o[][	UO
2]
2FD'oUO
UO
V"]
*2J)	UO2oUO[U2UO2P!)r)r�r��BytesFeedParserr�r^r3rVrWr1r�r4)r5�bfpr�r�s&   r8�test_bytes_feedparser�+Test8BitBytesHandling.test_bytes_feedparsermst�����.�.�0���q�#�d�0�0�1�2�6�A��H�H�T�'�'��B�$�/�0�7��I�I�K������Q���!:�!:�;r;c�l�[QQ29^tt^2oUO2oPPP2[OW2o[	2o[O
O
U2oUOUQQ5UOUO2U2P!)%fhK�9h)r�rtr�r�)
r'r�r�r�rr�rr�r1r�r�s&     r8r��'Test8BitBytesHandling.test_crlf_flattents{��
�l�D�
)�
)�R��7�7�9�D�*��&�&�t�,���I���O�O�*�*�1�-��	�	�	�#�v�	�&��������t�,�
*�
)�s�B#�#B3	�,B3	c�2�[OQ2OQ2o[OU2o[2o[OOU2oUOU2UOUO2U2P!)uo            Date: Fri, 18 Mar 2011 17:15:43 +0100
            To: foo@example.com
            From: foodwatch-Newsletter <bar@example.com>
            Subject: Aktuelles zu Japan, Klonfleisch und Smiley-System
            Message-ID: <76a486bee62b0d200f33dc2ca08220ad@localhost.localdomain>
            MIME-Version: 1.0
            Content-Type: multipart/alternative;
                    boundary="b1_76a486bee62b0d200f33dc2ca08220ad"

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

            Guten Tag, ,

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


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

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

            rY)r�r�r�r�r�rr�rr�r1r�)r5rr7r�r�s&    r8�test_8bit_multipart�)Test8BitBytesHandling.test_8bit_multipart}st�����%"�%�J����K	�L�&�&�v�.���I���O�O�*�*�1�-��	�	�	�#���������v�.r;c���[2o[Q2UQ$[2o[OOU2oUO
UQQ5UOUO2Q2P!)�žluťoučký kůňrXr�r�s5Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?=

)	rr
rr�r�rr�r1r��r5r�r�r�s&   r8�'test_bytes_generator_b_encoding_linesep�=Test8BitBytesHandling.test_bytes_generator_b_encoding_linesep�s^���I���3�4��)���I���O�O�*�*�1�-��	�	�	�!�V�	�$����
�J�J�L�H�	Jr;c���[2o[Q2UQ$[2o[OOU2oUO
UQQ5UOUO2Q2P!)rErXr�r�z5Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?=

)	rr
rr�r�r
r�r1r�rFs&   r8�!test_generator_b_encoding_linesep�7Test8BitBytesHandling.test_generator_b_encoding_linesep�s^���I���3�4��)���J���O�O�%�%�a�(��	�	�	�!�V�	�$����
�J�J�L�G�	Ir;rf))zFrom: foo@bar.comr�)uTo: báz)r�z=?unknown-8bit?q?b=C3=A1z?=)uVSubject: Maintenant je vous présente mon collègue, le pouf célèbre
	Jean de Baddie)rXz�=?unknown-8bit?q?Maintenant_je_vous_pr=C3=A9sente_mon_coll=C3=A8gue=2C_le_pouf_c=C3=A9l=C3=A8bre?=
 =?unknown-8bit?q?_Jean_de_Baddie?=)uFrom: göst)r�z=?unknown-8bit?b?Z8O2c3Q=?=)3rgrhrirjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrrrrrrr r$r'r�r.r0r3r4r5r8r=r�rBrGrJrIrkrl)r`r�rns00@r8r�r�s������?�?�$�
�L�6�6�7�$
6� D�<�
6� 	
���i�i�5G� H�5G��#��5G� H�I�#�$�%+�V�G�_��;�
C�	3�
=�3�B�K�8�9�=�E�!���
)�

��V�G�_��A�0�(0���8�(
�$�P�5�	H� @�E�E�d�K��	8�%9��S�!� $�y�y�)A�B��@��O�O�	%�	
��V�I�
��$�?�?�	,�	
��<�7�<�-�,/�\
J�
I��G��e	!Is�E
r�c�6`�\sQsQsnPsQsQQksQsUsP!)� BaseTestBytesGeneratorIdempotenti�c��[UQ29^tt^2oUO2oPPP2UOOUOW2o[
OU2oVC1!)%fhKO9h)rt)r'r��normalize_linesep_regex�sub�blinesepr�r�rFs&&   r8r2�(BaseTestBytesGeneratorIdempotent._msgobj�s^��
�h��
%�
%���7�7�9�D�&��+�+�/�/��
�
�t�D���&�&�t�,���y��	&�
%�s�A.�.A>	�7A>	c���[2o[OOU]Q5oUO	VUO
Q5UO
V$O22P!)rr)r�r�)rr�r�rr�r�r1r�)r5r7r_r�r_r�s&&&&  r8rI�,BaseTestBytesGeneratorIdempotent._idempotent�sJ���I���O�O�*�*�1�1�*�=��	�	�	�#�$�,�,�	�?�����z�z�|�,r;rfr�)	rgrhrirjrIr2rIrkrlrms@r8rMrM�s�����G��-�-r;rMc�D�\sQsQsQsQs\OQ2sQs	P!)�TestBytesGeneratorIdempotentNLi�r*r
s\r\nrf�
rgrhrirjr�rQ�re�compilerOrkrfr;r8rVrV�s���G��H� �j�j��2�r;rVc�D�\sQsQsQsQs\OQ2sQs	P!)� TestBytesGeneratorIdempotentCRLFi�r�r�s	(?<!\r)\nrfrWrfr;r8r[r[�s���G��H� �j�j��7�r;r[c�:`�\sQsQsnQsQsQsQsQsUs	P!)�
TestBase64i�c
�n�UOoU[OQ2[[OQPQ522[]2FD[oU]6Xc]oL*U]6:c]oL U]6:c]oLU]	6:c]oLU]6:c]oL]oU[OQU*2U2J]	P!)�hello�hello��eolr
)r1r�
header_lengthr^�body_encoder�)r5r6�size�bsizes&   r8�test_len�TestBase64.test_len�s���
�
�
��
�:�#�#�G�,��z�%�%�h�B�7�8�	:��"�I�D����Q�U����Q�U����Q�U����R�U����R�U�%'�U��z�'�'��d�
�3�U�;�r;c��UOoU[OP2Q2U[OQ2Q2P!)r;r;zaGVsbG8=r`)r1rr\r�s& r8�test_decode�TestBase64.test_decode�s7��
�
�
��
�:���R� �#�&�
�:���Z�(�(�3r;c�L�UOoU[OQ2P2U[OQ2Q2U[OQ2Q2U[OQ
](Q5Q2U[OQ
](QQ5Q	2P!)r;r`z	aGVsbG8=
shello
z	aGVsbG8K
r�z�eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
r��r�rbz�eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHgg
eHh4eCB4eHh4IA==
sdxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx )r1rrdr�s& r8�test_encode�TestBase64.test_encode�s���
�
�
��
�:�!�!�#�&��+�
�:�!�!�(�+�\�:�
�:�!�!�*�-�|�<�
�:�!�!�-�B�?�B�	�	�:�!�!�-�B�F�K��	r;c���UOo[OoUUQ2Q2UUQ2Q2UUQ2Q2UUQQQ5Q2UUQ2Q2P!)	r_z=?iso-8859-1?b?aGVsbG8=?=�hello
worldz!=?iso-8859-1?b?aGVsbG8NCndvcmxk?=�hello
worldz!=?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=r{r�z=?iso-8859-2?b?aGVsbG8=?=)r1rrI)r5r6�hes&  r8�test_header_encode�TestBase64.test_header_encodesj��
�
�
��
�
%�
%��
�2�g�;�3�4�
�2���!D�E�
�2�n��B�C�
�2�g�|�,�.I�J�
�2�n��B�Cr;rf)
rgrhrirjrgrjrnrtrkrlrms@r8r]r]�s ����<�4�
�,D�Dr;r]c��`�\sQsQsnQsQsQsQsQsQs	QIQks
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQIQksQsQsQsQsQsQsQsQsQsQs Qs!Q s"Q!s#Q"s$Q#s%Q$s&Q%s'Q&s(Q's)Q(s*Q)s+Q*s,Q+s-Q,s.Q-s/Q.s0QJQ/ks1Q0s2Q1s3Q2s4Q3s5Q4s6Q5s7Q6s8Q7s9Q8s:Q9s;Q:s<Q;s=Q<s>Q=s?Q>s@Q?sAQ@sBQAsCQBsDQCsEQDsFQEsGQFsHQGsIQHsJUsKP!)K�
TestQuopriic���[[[[Q2[Q2]*2[[Q2[Q2]*2[[Q2[Q2]*2QQ222Um[Q2Tt,tFDpUO7fJUMJ	toUm[[[Q	2[Q
2]*22UmUOO[Q22UOO[Q22[Q2Tt,tFDpUO7fJUMJ	toUm	P!ttohttoh)
r��zr��Zr��9c3�0�SF �Dpw�	J		P!3hrlrf)r�rs& r8r��#TestQuopri.setUp.<locals>.<genexpr>"s������1�Q��r�s!*+-/�r+�~r��=)
r�rr��ord�hlit�hnon�blitr��remove�bnon�r5rs& r8rN�TestQuopri.setUps�����#�c�(�C��H�q�L�)��#�c�(�C��H�q�L�)��#�c�(�C��H�q�L�)�!��!�	#�$��	�!&�c�
�A�
�1�t�y�y�.@�Q�Q�
�A��	���s�3�x��S��A��6�7��	��	�	����T��#��	�	����S��"�!&�c�
�A�
�1�t�y�y�.@�Q�Q�
�A��	��B��Bs�E0�2E0�E5� E5c	�0�UOFD9oUO[OU2Q[	U2*2J;	UO
FD9oUO
[OU2Q[	U2*2J;	P!)z'Should not be header quopri encoded: %sz#Should be header quopri encoded: %s)r�r�r!�header_check�chrr�r
r�s& r8�test_quopri_header_check�#TestQuopri.test_quopri_header_check1sn�����A����Z�4�4�Q�7�A�C��F�J�
L�����A��O�O�J�3�3�A�6�A�C��F�J�
L�r;c	�0�UOFD9oUO[OU2Q[	U2*2J;	UO
FD9oUO
[OU2Q[	U2*2J;	P!)z%Should not be body quopri encoded: %sz!Should be body quopri encoded: %s)r�r�r!�
body_checkr�r�r
r�s& r8�test_quopri_body_check�!TestQuopri.test_quopri_body_check9sn�����A����Z�2�2�1�5�?�#�a�&�H�
J�����A��O�O�J�1�1�!�4�?�#�a�&�H�
J�r;c
�.�UOoU[OQ2]2U[[OQQQ52[OQ2]
*2U[OQ2]2U[[OQQQ52[OQ2]
*2UO
FD;oU[O[
U,22]Q[U2*2J=	UOFDMoU[Q26XcJU[O[
U,22]Q[U2*2JO	U[OQ2]2P!)r`�xxxr�s
h@e@l@l@o@zexpected length 1 for %rr+zexpected length 3 for %r� )
r1r!rcr^rIr�rr�r�r��r5r6rs&  r8�test_header_quopri_len�!TestQuopri.test_header_quopri_lenAs4��
�
�
��
�:�#�#�H�-�q�1�
�3�z�'�'��%�@�A��#�#�H�-�
��	�	�:�#�#�M�2�B�7�
�3�z�'�'�
�u�E�F��#�#�M�2�
��	����A��z�'�'��q�c�
�3�Q�)�C��F�2�
4�����A��C��H�}���z�'�'��q�c�
�3�Q�)�C��F�2�
4�	�	�:�#�#�D�)�1�-r;c	��UOoUOFD*oU[O[	U,22]2J,	UO
FD*oU[O[	U,22]2J,	P!r�)r1r�r!�body_lengthrr�r�s&  r8�test_body_quopri_len�TestQuopri.test_body_quopri_lenZs_��
�
�
�����A��z�%�%�e�Q�C�j�1�1�5�����A��z�%�%�e�Q�C�j�1�1�5�r;c	��[Q2FDHo[U2oUO[O[O
U22U2JJ	P!)r~)r�r�r1r!rO�quote)r5r
rs&  r8�test_quote_unquote_idempotent�(TestQuopri.test_quote_unquote_idempotentas?���s��A��A��A����Z�/�/�
�0@�0@��0C�D�a�H�r;c��Ue[OU2oL[OV2oUOVB2P!rl)r!rIr1)r5r��expected_encoded_headerrA�encoded_headers&&&& r8�_test_header_encode�TestQuopri._test_header_encodefs5���?�'�5�5�f�=�N�'�5�5�f�F�N�����Ar;c�,�UOQP2P!)r;�r�rMs&r8�test_header_encode_null�"TestQuopri.test_header_encode_nullms��� � ��b�)r;c�,�UOQQ2P!)r`z=?iso-8859-1?q?hello?=r�rMs&r8�test_header_encode_one_word�&TestQuopri.test_header_encode_one_wordps��� � ��+C�Dr;c�,�UOQQ2P!)shello
worldz=?iso-8859-1?q?hello=0Aworld?=r�rMs&r8�test_header_encode_two_lines�'TestQuopri.test_header_encode_two_linesss��� � �� @�	Br;c�,�UOQQ2P!)shello�therez=?iso-8859-1?q?hello=C7there?=r�rMs&r8�test_header_encode_non_ascii�'TestQuopri.test_header_encode_non_asciiws��� � �!2� @�	Br;c�0�UOQQQQ5P!)r`z=?iso-8859-2?q?hello?=r{r�r�rMs&r8�test_header_encode_alt_charset�)TestQuopri.test_header_encode_alt_charset{s��� � ��+C�$�	!�	&r;c�V�[OU2oUOV22P!rl)r!�
header_decoder1)r5r��expected_decoded_header�decoded_headers&&& r8�_test_header_decode�TestQuopri._test_header_decodes ��#�1�1�.�A������Ar;c�,�UOPP2P!r�r�rMs&r8�test_header_decode_null�"TestQuopri.test_header_decode_null�s��� � ��R�(r;c�,�UOQQ2P!�r_r�rMs&r8�test_header_decode_one_word�&TestQuopri.test_header_decode_one_word�s��� � ��'�2r;c�,�UOQQ2P!)z
hello=0Aworldrrr�rMs&r8�test_header_decode_two_lines�'TestQuopri.test_header_decode_two_lines�s��� � ��.�Ar;c�,�UOQQ2P!)z
hello=C7thereuhelloÇtherer�rMs&r8�test_header_decode_non_ascii�'TestQuopri.test_header_decode_non_ascii�s��� � ��2B�Cr;c�T�UO[OQ2Q2P!)z=30a=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30=30�00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)r1r!r�rMs&r8�test_header_decode_re_bug_18380�*TestQuopri.test_header_decode_re_bug_18380�s������1�1�+�>�	�Jr;c��Ue[OU2oL[OVQ5oUOVB2P!)Nra)r!r\r1)r5�encoded�expected_decodedrb�decodeds&&&& r8�_test_decode�TestQuopri._test_decode�s5���;� �'�'��0�G� �'�'��9�G�����3r;c�,�UOPP2P!r�r�rMs&r8�test_decode_null_word� TestQuopri.test_decode_null_word�������"�b�!r;c�,�UOQQ2P!)r�r*r�rMs&r8�test_decode_null_line_null_word�*TestQuopri.test_decode_null_line_null_word�s�����&�$�'r;c�,�UOQQ2P!r�r�rMs&r8�test_decode_one_word�TestQuopri.test_decode_one_word�s�����'�7�+r;c�0�UOQQQQ5P!)r_�Xrar�rMs&r8�test_decode_one_word_eol�#TestQuopri.test_decode_one_word_eol�s�����'�7���4r;c�,�UOQQ2P!��hello
�hello
r�rMs&r8�test_decode_one_line�TestQuopri.test_decode_one_line�������+�y�1r;c�,�UOQQ2P!�r�r�rMs&r8�test_decode_one_line_lf�"TestQuopri.test_decode_one_line_lf�������)�Y�/r;c�,�UOQQ2P!)zhello
r�r�rMs&r8�test_decode_one_line_cr�"TestQuopri.test_decode_one_line_cr�r�r;c�0�UOQQQQ5P!)r��helloXr�rar�rMs&r8�test_decode_one_line_nl�"TestQuopri.test_decode_one_line_nl�s�����)�X�3��7r;c�0�UOQQQQ5P!)r�r�r�rar�rMs&r8�test_decode_one_line_crnl�$TestQuopri.test_decode_one_line_crnl�s�����+�x�S��9r;c�,�UOQQ2P!)rqrrr�rMs&r8�test_decode_one_line_one_word�(TestQuopri.test_decode_one_line_one_word�s�����*�N�;r;c�0�UOQQQQ5P!)rq�helloXworldr�rar�rMs&r8�!test_decode_one_line_one_word_eol�,TestQuopri.test_decode_one_line_one_word_eol�s�����*�M�s��Cr;c�,�UOQQ2P!)�hello
world
�hello
world
r�rMs&r8�test_decode_two_lines� TestQuopri.test_decode_two_lines�s�����.�0@�Ar;c�0�UOQQQQ5P!)r	�helloXworldXr�rar�rMs&r8�test_decode_two_lines_eol�$TestQuopri.test_decode_two_lines_eol�s�����.��C��Hr;c�,�UOQQ2P!)�Spam��SpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamSpamr�rMs&r8�test_decode_one_long_line�$TestQuopri.test_decode_one_long_line�s�����,��5r;c�,�UOQP2P!�r+r�rMs&r8�test_decode_one_space� TestQuopri.test_decode_one_space�s�����#�r�"r;c�,�UOQP2P!)r+z     r�rMs&r8�test_decode_multiple_spaces�&TestQuopri.test_decode_multiple_spaces�s�����'�2�&r;c�,�UOQQ2P!)zhello    
r�r�rMs&r8�$test_decode_one_line_trailing_spaces�/TestQuopri.test_decode_one_line_trailing_spaces�s�����/�9�5r;c�,�UOQQ2P!)zhello    
world   
r	r�rMs&r8�%test_decode_two_lines_trailing_spaces�0TestQuopri.test_decode_two_lines_trailing_spaces�s�����5�7G�Hr;c�,�UOQQ2P!)z=22quoted=20words=22z"quoted words"r�rMs&r8�test_decode_quoted_word�"TestQuopri.test_decode_quoted_word�s�����0�2B�Cr;c�,�UOQQ2P!)zab=CD=EF�abÍïr�rMs&r8�test_decode_uppercase_quoting�(TestQuopri.test_decode_uppercase_quoting�������*�l�3r;c�,�UOQQ2P!)zab=cd=efr	r�rMs&r8�test_decode_lowercase_quoting�(TestQuopri.test_decode_lowercase_quoting�r!	r;c�,�UOQQ2P!)zsoft line=
breakzsoft linebreakr�rMs&r8�test_decode_soft_line_break�&TestQuopri.test_decode_soft_line_break�s�����/�1A�Br;c�,�UOQQ2P!)zA=1,B=A ==> A+B==2r�rMs&r8�test_decode_false_quoting�$TestQuopri.test_decode_false_quoting�s�����.�0D�Er;c�0�UOQQQQ5P!)�abcr�rar�rMs&r8�(test_decode_crlf_eol_no_trailing_newline�3TestQuopri.test_decode_crlf_eol_no_trailing_newline�s�����%��F��3r;c�0�UOQQQQ5P!)za
br�rar�rMs&r8�2test_decode_crlf_eol_multiline_no_trailing_newline�=TestQuopri.test_decode_crlf_eol_multiline_no_trailing_newline�s�����(�H�&��9r;c�0�UOQQQQ5P!)zabc
r�rar�rMs&r8�*test_decode_crlf_eol_with_trailing_newline�5TestQuopri.test_decode_crlf_eol_with_trailing_newline�s�����)�Y�F��;r;c��-oUe]LoLV5Q$UeQoLVEQ$[OU1-U@oUOVb2UQ6XfUQ6Xc6UO2FDoUO	[U2U2J 	P!P!)Nr�r*rbr�)r!rdr1r�rwr^)r5r��expected_encoded_bodyr�rb�kwargs�encoded_body�lines&&&&&   r8�_test_encode�TestQuopri._test_encode�s��������J�#-�<� ��;��C��5�M�!�-�-�d�=�f�=������=��$�;�#��-�%�/�/�1���$�$�S��Y�
�;�2�(r;c�,�UOPP2P!r�r:	rMs&r8�test_encode_null�TestQuopri.test_encode_null�r�r;c�,�UOQQ2P!)z

r=	rMs&r8�test_encode_null_lines�!TestQuopri.test_encode_null_lines�s�����&�&�)r;c�,�UOQQ2P!r�r=	rMs&r8�test_encode_one_line�TestQuopri.test_encode_one_liner�r;c�,�UOQQ2P!r�r=	rMs&r8�test_encode_one_line_crlf�$TestQuopri.test_encode_one_line_crlfr�r;c�0�UOQQQQ5P!)r�r�r�rar=	rMs&r8�test_encode_one_line_eol�#TestQuopri.test_encode_one_line_eols�����)�[�f��=r;c�l�UOQOQ2OQ2QQQ5P!)uhelloυ
rY�latin1z
hello=CF=85
r�ra)r:	r�r\rMs&r8�(test_encode_one_line_eol_after_non_ascii�3TestQuopri.test_encode_one_line_eol_after_non_asciis2�����/�0�0��9�@�@��J�+��	�	9r;c�,�UOQQ2P!)r+z=20r=	rMs&r8�test_encode_one_space� TestQuopri.test_encode_one_spaces�����#�u�%r;c�,�UOQQ2P!)� 
z=20
r=	rMs&r8�test_encode_one_line_one_space�)TestQuopri.test_encode_one_line_one_spaces�����%��)r;c�,�UOQQ2P!)z 
 
z=20
=20
r=	rMs&r8�test_encode_two_lines_one_space�*TestQuopri.test_encode_two_lines_one_spaces�����(�L�1r;c�,�UOQQ2P!)zhello   z
hello  =20r=	rMs&r8�$test_encode_one_word_trailing_spaces�/TestQuopri.test_encode_one_word_trailing_spacesr!	r;c�,�UOQQ2P!)z	hello   
zhello  =20
r=	rMs&r8�$test_encode_one_line_trailing_spaces�/TestQuopri.test_encode_one_line_trailing_spaces!s�����,��7r;c�,�UOQQ2P!)zhello  	z
hello  =09r=	rMs&r8�!test_encode_one_word_trailing_tab�,TestQuopri.test_encode_one_word_trailing_tab$s�����+�|�4r;c�,�UOQQ2P!)z	hello  	
zhello  =09
r=	rMs&r8�!test_encode_one_line_trailing_tab�,TestQuopri.test_encode_one_line_trailing_tab's�����-��8r;c�0�UOQQ]Q5P!)�
abcd 
1234zabcd =

1234r�r=	rMs&r8�,test_encode_trailing_space_before_maxlinelen�7TestQuopri.test_encode_trailing_space_before_maxlinelen*s�����-�)9�a��Hr;c�0�UOQQ]Q5P!)rg	zabcd=
=20
1234r�r=	rMs&r8�(test_encode_trailing_space_at_maxlinelen�3TestQuopri.test_encode_trailing_space_at_maxlinelen-������-�);���Jr;c�0�UOQQ]Q5P!)rg	zabc=
d=20
1234r�r=	rMs&r8�,test_encode_trailing_space_beyond_maxlinelen�7TestQuopri.test_encode_trailing_space_beyond_maxlinelen0rm	r;c�,�UOQQ2P!)rT	z
 
 
 
 
 
z=20
=20
=20
=20
=20
r=	rMs&r8�test_encode_whitespace_lines�'TestQuopri.test_encode_whitespace_lines3s�����)�[�1r;c�,�UOQQ2P!)za = bza =3D br=	rMs&r8�test_encode_quoted_equals�$TestQuopri.test_encode_quoted_equals6s�����'�9�-r;c�,�UOQQ2P!)r
�dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxr=	rMs&r8�test_encode_one_long_string�&TestQuopri.test_encode_one_long_string9s�����)�%@�Ar;c�,�UOQQ2P!)r
zexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
zgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxx
r=	rMs&r8�test_encode_one_long_line�$TestQuopri.test_encode_one_long_line<s�����*�,N�Or;c�,�UOQQ2P!)r
z�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
z�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
r=	rMs&r8�test_encode_one_very_long_line�)TestQuopri.test_encode_one_very_long_line?s�����*�8�	:r;c�0�UOQQ]Q5P!)r�r�z=====z=3D=
=3D=
=3D=
=3D=
=3Dr=	rMs&r8�test_encode_shortest_maxlinelen�*TestQuopri.test_encode_shortest_maxlinelenCs�����'�#7�A��Fr;c�P�UO[UOPP]Q5P!)r;r�)r�r�r:	rMs&r8� test_encode_maxlinelen_too_small�+TestQuopri.test_encode_maxlinelen_too_smallFs!�����*�d�&7�&7��R�A��Nr;c��UOoU[OP2P2U[OQ2Q2U[OQ2Q2U[OQ
](Q5Q2U[OQ
](QQ5Q2U[OQ	2Q	2P!)r;r_rqrrr�zjxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20r�rmzlxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx=
 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxx=
x xxxx xxxx xxxx xxxx=20zone line

two line�dxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx )r1r!rdr�s& r8rn�TestQuopri.test_encodeIs���
�
�
��
�:�!�!�"�%�r�*�
�:�!�!�'�*�G�4�
�:�!�!�"2�3�^�D�
�:�!�!�,�2�>�A�	�
	�:�!�!�,�2�6�J��	�
	�:�!�!�#�
��	
r;)r�r�r�r�rl)NN)LrgrhrirjrNr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r	r	r	r	r	r	r	r	r	r#	r&	r)	r-	r0	r3	r:	r>	rA	rD	rG	rJ	rN	rQ	rU	rX	r[	r^	ra	rd	rh	rk	ro	rr	ru	ry	r|	r	r�	r�	rnrkrlrms@r8rwrws�����6�,L�J�.�26�I�
B�*�E�B�B�&�B�)�3�B�D�K�4�"�(�,�5�2�0�0�8�:�<�D�B�I�6�#�'�6�I�D�4�4�C�F�4�:�<�<�("�*�0�2�>�9�
&�*�2�4�8�5�9�I�K�K�2�.�B�P�:�G�O�
�
r;rwc�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�TestCharsetiec�T�]QHGoUOQP![cP!h9h)rr��fake)r�rA�CHARSETSr�)r5�
CharsetModules& r8�tearDown�TestCharset.tearDownfs*��2�	��&�&�v�.���	��	�s�
�	'�'�'c�V�]QHGo[2oUOUOQ2UOUO
P2UOUOP2UOUOQ2UOUOP2UOUOP2[Q2oUOUOQ2UOUO
P2UOUOP2UOUOQ2UOUOP2UOUOP2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q	2oUOUOQ
2UOUO
UO2UOUOUO2UOUOQ
2UOUOQ
2UOUOQ
2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q
2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOP2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2P!)rr�rOr�rYrM	r=�latin9ziso-8859-15�cyrillicz
iso-8859-5�cp1251zwindows-1251�cp1252r��eucjpr�rl�cp949zks_c_5601-1987�gb2312�big5)
r�rAr	r1rJ�header_encodingrer��input_codec�output_codec�SHORTEST�BASE64�QP�r5rArs&  r8�test_attributes�TestCharset.test_attributesms���!��I��������*�5�����*�*�D�1�������$�/�����)�)�:�6��������-��������.��J���������*�5�����*�*�D�1�������$�/�����)�)�:�6��������-��������.��F�O��������'�2�����*�*�G�,<�,<�=�������'�.�.�9�����)�)�7�3��������0��������1��H���������,�7�����*�*�G�J�J�7�������'�*�*�5�����)�)�<�8��������5��������6��H���������-�8�����*�*�G�J�J�7�������'�*�*�5�����)�)�=�9�������
�6��������7��J���������,�7�����*�*�G�,<�,<�=�������'�.�.�9�����)�)�<�8��������5��������6��H���������.�9�����*�*�G�,<�,<�=�������'�.�.�9�����)�)�>�:��������7��������8��H���������.�9�����*�*�G�J�J�7�������'�*�*�5�����)�)�>�:��������7��������8��G���������(�3�����*�*�G�N�N�;�������$�/�����)�)�=�9��������1��������7��G���������*:�;�����*�*�G�,<�,<�=�������'�.�.�9�����)�)�+;�<�������(8�9�������)9�:��H���������(�3�����*�*�G�N�N�;�������'�.�.�9�����)�)�8�4��������1��������2��F�O��������&�1�����*�*�G�N�N�;�������'�.�.�9�����)�)�6�2��������/��������0r;c���]QHGo[Q2oUOUOQ2UOUO
UO2UOUOUO2UOUOQ2UOUOQ2UOUOQ2UOQQ2UOQQ2UOQQ2UOQQ2UOQUOPQ2[Q2oUOUOQ2UOUO
UO2UOUOP2UOUOQ2UOUOQ2UOUOQ2P!)	rr��fake0�fake1z	mime-fakezoutput-mime-fakezoutput-mime-fake-alias�	fakecodec�outputfakecodec)r�rAr	r1rJr�	r�	rer�	r�r�	r�	�	add_alias�	add_codec�add_charsetr�	r�	s&  r8�test_user_charsets�TestCharset.test_user_charsets�s~��!��G���������'�2�����*�*�G�,<�,<�=�������'�.�.�9�����)�)�7�3��������0��������1����'�;�/����,�.F�G����+�{�3����2�4E�F����K����T�;M�N��G���������+�6�����*�*�G�J�J�7�������$�/�����)�)�+C�D��������4�������):�;r;c���UOo[Q2oUUOQ2Q2QoUO[UOU2[Q2oUUOU2Q2P!)rO�Hello World!u¤¢¤¤¤¦¤¨¤ªrYz(=?utf-8?b?wqTCosKkwqTCpMKmwqTCqMKkwqo=?=)r1r	rIr�rY)r5r6rr�s&   r8�test_codec_encodeable�!TestCharset.test_codec_encodeable�sc��
�
�
���J���
�1�?�?�>�*�N�;�6�����,�����;��G���
�1�?�?�1��I�Jr;c���UOo[Q2oUQUOQ22[Q2oUQUOQ22[Q2oUQUOQ22[Q2oUQ	UOQ
22]QHGoUOQUOPQ2[Q2oUQUOQ22P!)
r=z
hello w=F6rlduhello wörldrYr�r�rOr�r�z$B5FCO;~IW(B�菊地時夫r�r�	)r1r	rdr�rAr�	r�	)r5r6rr�	s&   r8�test_body_encode�TestCharset.test_body_encode�s���
�
�
���L�!��
�?�A�M�M�*:�;�<��G���
�����~�!>�?��J���
�=�!�-�-�
�6�7��H���
�!��=�=�3�4�	6�
	3��!�!�&�-�*:�*:�D�'�J��F�O��
�=�!�-�-�
�6�7r;c��[Q2oUO[U2Q2UO[O
[Q2P!)rOuascÿii�r	r1r�r�r�CharsetErrorr�s& r8�test_unicode_charset_name�%TestCharset.test_unicode_charset_name
s8���*�%������W��z�2����&�-�-�w��Dr;c��[Q2oUO[U2Q2UO[O
[Q2P!)sus-asciirOsasc�iir�	r�s& r8�test_bytes_charset_name�#TestCharset.test_bytes_charset_names8���+�&������W��z�2����&�-�-�w��Er;rf)
rgrhrirjr�	r�	r�	r�	r�	r�	r�	rkrlrms@r8r�	r�	es3�����`1�D<�0	K�8�0E�
F�Fr;r�	c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsUsP!)�
TestHeaderic��UOo[Q2oUUO2Q2UOQ2UUO2Q2P!)r�	z Goodbye World!zHello World!  Goodbye World!�r�r
r�r�r�s&  r8�test_simple�TestHeader.test_simplesE��
�
"�
"���>�"��
�1�8�8�:�~�&�	���"�#�
�1�8�8�:�5�6r;c��UOo[Q2oUUO2Q2UOQ2UUO2Q2P!)r�	zGoodbye World!zHello World! Goodbye World!r�	r�s&  r8�test_simple_surprise�TestHeader.test_simple_surprisesE��
�
"�
"���>�"��
�1�8�8�:�~�&�	���!�"�
�1�8�8�:�4�5r;c�H�QoUO[U2UP1,2P!)zno decoding neededr�r�s& r8�test_header_needs_no_decoding�(TestHeader.test_header_needs_no_decoding&s"�� ������q�)�Q��I�;�7r;c��[Q]LQ5oUOQQ5OQ2FDoUO[	U2]L2J 	P!)a�I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.r�r+)�
splitcharsz
 )r
r�r�rwr^)r5r��ls&  r8�	test_long�TestHeader.test_long*sI���L� �
"�����S��)�/�/��6�A�� � ��Q���,�7r;c�@�UOo[Q2o[Q2o[Q2oQoQoQo[VR2oUOVc2UOVt2UO	]LQ5o	UU	Q2[U	2o
U[
U
2]2UU
]*UQ12UU
]*UQ12UU
]*UO	Q2Q12[U2oUUQOQ22[[U	22oUV�2P!)	r=r{rYr�r�r�r�a=?iso-8859-1?q?Die_Mieter_treten_hier_ein_werden_mit_einem_Foerderband_kom?=
 =?iso-8859-1?q?fortabel_den_Korridor_entlang=2C_an_s=FCdl=FCndischen_Wand?=
 =?iso-8859-1?q?gem=E4lden_vorbei=2C_gegen_die_rotierenden_Klingen_bef=F6r?=
 =?iso-8859-1?q?dert=2E_?= =?iso-8859-2?q?Finan=E8ni_metropole_se_hroutily?=
 =?iso-8859-2?q?_pod_tlakem_jejich_d=F9vtipu=2E=2E_?= =?utf-8?b?5q2j56K6?=
 =?utf-8?b?44Gr6KiA44GG44Go57+76Kiz44Gv44GV44KM44Gm44GE44G+44Gb44KT44CC?=
 =?utf-8?b?5LiA6YOo44Gv44OJ44Kk44OE6Kqe44Gn44GZ44GM44CB44GC44Go44Gv44Gn?=
 =?utf-8?b?44Gf44KJ44KB44Gn44GZ44CC5a6f6Zqb44Gr44Gv44CMV2VubiBpc3QgZGFz?=
 =?utf-8?b?IE51bnN0dWNrIGdpdCB1bmQgU2xvdGVybWV5ZXI/IEphISBCZWloZXJodW5k?=
 =?utf-8?b?IGRhcyBPZGVyIGRpZSBGbGlwcGVyd2FsZHQgZ2Vyc3B1dC7jgI3jgajoqIA=?=
 =?utf-8?b?44Gj44Gm44GE44G+44GZ44CC?=s�Die Mieter treten hier ein werden mit einem Foerderband komfortabel den Korridor entlang, an südlündischen Wandgemälden vorbei, gegen die rotierenden Klingen befördert. Finančni metropole se hroutily pod tlakem jejich důvtipu.. 正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.」と言っています。)
r�r	r
r�r�rr^r�r\r)
r5r6r�r�r�r�r�r�r��encr��ustr�newhs
&            r8�test_multilingual�TestHeader.test_multilingual0s��
�
"�
"���L�!��
�\�
"���w���B��$��0�	�
�6���	�����	����!��h�h�"�h�%��
�3�)�	*� ��$��
�3�w�<���
�7�1�:���-�.�
�7�1�:���.�/�
�7�1�:�	�(�(��1�7�;�<��1�v��
�4�
D� �f�W�o�#	�&�=��-�.��
�4�r;c�\�[2oUOUO2P2P!rr�r�s& r8�test_empty_header_encode�#TestHeader.test_empty_header_encodeos���H���������R�(r;c��UOo[2oUUP2UOQ[Q22UUQ2P!)r;r�r=)r�r
r�r	r�s&  r8�test_header_ctor_default_args�(TestHeader.test_header_ctor_default_argsss9��
�
"�
"���H��
�1�b�	�	������-�.�
�1�e�r;c�f�UOoQo[U2oUUO2Q2U[U2U2[UQQ5oUUO2Q2U[U2U2[UQQQ5oUUO2U2U[U2U2P!)z|A very long line that must get split to something other than at the 76th character boundary to test the non-default behaviorz}A very long line that must get split to something other than at the 76th
 character boundary to test the non-default behaviorrXr�z}A very long line that must get split to something other than at the
 76th character boundary to test the non-default behavior�)r�r�)r�r
r�r�r�s&   r8�test_explicit_maxlinelen�#TestHeader.test_explicit_maxlinelenzs���
�
"�
"����
�4�L��
�1�8�8�:�8�	9�	�3�q�6�4���4�Y�/��
�1�8�8�:�=�	>�	�3�q�6�4���4�D�i�@��
�1�8�8�:�t��
�3�q�6�4�r;c
��UOo[Q]Q5oQoUOU2UO2oUUQ2UU[	[[
U2222[Q](Q5oUOQ2UO2oUUQ2UU[	[[
U2222P!)r=�rAr�a=?iso-8859-1?q?xxx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_x?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?x_?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?xx?=
 =?iso-8859-1?q?_?=z�=?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xxx?=
 =?iso-8859-1?q?x_xxxx_xxxx_xxxx_xxxx_?=
 =?iso-8859-1?q?xxxx_xxxx_xxxx_xxxx_xx?=
 =?iso-8859-1?q?xx_xxxx_xxxx_xxxx_xxxx?=
 =?iso-8859-1?q?_xxxx_xxxx_?=r�	�r�r
r�r�r�rr�r5r6r�r
r�s&    r8�test_quopri_splittable�!TestHeader.test_quopri_splittable�s���
�
"�
"���<�B�7����	�����
�H�H�J��
�1�2�2	�f	�1�c�+�m�A�.�/�0�1��<�B�7��	�����
�H�H�J��
�1�!�	"�	�1�c�+�m�A�.�/�0�1r;c
��UOo[Q]Q5oQoUOU2UO2oUUQ2UU[	[[
U2222[Q](Q5oUOU2UO2oUUQ2UU[	[[
U2222P!)r|r�	a�=?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IHh4?=
 =?koi8-r?b?eHgg?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?eCB4?=
 =?koi8-r?b?eHh4?=
 =?koi8-r?b?IA==?=z�=?koi8-r?b?eHh4eCB4eHh4IHh4eHggeHh4?=
 =?koi8-r?b?eCB4eHh4IHh4eHggeHh4eCB4?=
 =?koi8-r?b?eHh4IHh4eHggeHh4eCB4eHh4?=
 =?koi8-r?b?IHh4eHggeHh4eCB4eHh4IHh4?=
 =?koi8-r?b?eHggeHh4eCB4eHh4IHh4eHgg?=
 =?koi8-r?b?eHh4eCB4eHh4IA==?=r�	r�	r�	s&    r8�test_base64_splittable�!TestHeader.test_base64_splittable�s���
�
"�
"���8��3����	�����
�H�H�J��
�1�"�"	�F	�1�c�+�m�A�.�/�0�1��8��3��	�����
�H�H�J��
�1�"�	#�	�1�c�+�m�A�.�/�0�1r;c��UOoQo[U2oUUQ,2[U2oUV$O22P!)r_)r_N�r1rrr�)r5r6r�r
r�s&    r8�test_us_ascii_header�TestHeader.test_us_ascii_headers@��
�
�
�����!���
�1��� ���N��
�1�h�h�j�r;c�j�UOo[2oUOQQ2UUQ2P!)r_r=)r1r
r�r�s&  r8�test_string_charset�TestHeader.test_string_charsets+��
�
�
���H��	����,�'�
�1�g�r;c��UOo[QQ2oUUO2Q2[QQ2oUUO2Q2P!)r�rYz=?utf-8?q?p=C3=B6stal?=r�	z=?utf-8?b?6I+K5Zyw5pmC5aSr?=�r1r
r�r�s&  r8�test_utf8_shortest�TestHeader.test_utf8_shortestsH��
�
�
���;��(��
�1�8�8�:�0�1��-�w�7��
�1�8�8�:�5�6r;c	�L�UOoUOoQoU[[U2[2oU[UOU2UOQQ2oU[
[UQQ52U2UO	UQQ5U[
U2U2P!)�0Ynwp4dUEbay Auction Semiar- No Charge � Earn BigrYrr)r�r1rYr
r�r\r�)r5rr6r
r��es&     r8�test_bad_8bit_header�TestHeader.test_bad_8bit_header&s����"�"��
�
�
��B���|�V�Q�'��H���|�Q�X�X�q�)�
�H�H�W�i�(��
�3�v�a�	�*�+�Q�/�	����9��%�
�3�q�6�1�
r;c��QoUOQQ2o[U[OOQ5oUO[
U2Q2UO[OOU2UQ1,2P!)r�	r��surrogateescaper��2Ynwp4dUEbay Auction Semiar- No Charge � Earn Big�unknown-8bit)	r\r
r�rA�UNKNOWN8BITr1r�r�r)r5r
r�	r�s&   r8�test_escaped_8bit_header�#TestHeader.test_escaped_8bit_header2sm��B��
�H�H�W�/�0���1�e�m�m�7�7�8������Q��O�	Q�������3�3�A�6�!�^�9L�8M�Nr;c���Qo[U[OOQ5oUO	[U2Q2UO	[OOU2UQ1,2P!�r�	r�r�	r�	)r
r�rAr�	r1r�r�r)r5r
r�s&  r8�&test_header_handles_binary_unknown8bit�1TestHeader.test_header_handles_binary_unknown8bit:s\��B���1�e�m�m�7�7�8������Q��O�	Q�������3�3�A�6�!�^�9L�8M�Nr;c�h�Qo[U[OOQ5o[OO[OO
U22oUO[U2Q2UO[OO
U2UQ1,2P!r
)	r
r�rAr�	r�rrr1r�)r5r
r��h2s&   r8�+test_make_header_handles_binary_unknown8bit�6TestHeader.test_make_header_handles_binary_unknown8bitAs��B���1�e�m�m�7�7�8��
�\�\�
%�
%�e�l�l�&@�&@��&C�
D������R��O�	Q�������3�3�B�7�1�n�:M�9N�Or;c��[Q2o[OOU2oUO	Q2UO[
U2Q2P!)r
)r��test2)r
r�r�rr�r1r�)r5r�rXs&  r8�0test_modify_returned_list_does_not_change_header�;TestHeader.test_modify_returned_list_does_not_change_headerIs@���6�N�����+�+�A�.���
�
�(�)�����Q���(r;c��UOo[2oUOQQ2UOQ2UO2oUUQ2[	[U22oUUO2U2P!)r_r=�worldz=?iso-8859-1?q?hello?= world)r1r
r�r�rr)r5r6r�r�s&   r8� test_encoded_adjacent_nonencoded�+TestHeader.test_encoded_adjacent_nonencodedOsc��
�
�
���H��	����,�'�	�����
�H�H�J��
�1�,�-��
�a�(�)��
�1�8�8�:�q�r;c��UOoQo[U2oUU,QN2[U2oUUO2Q2P!)zGSubject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztk=?= =?koi8-r?q?=CA?= zz.z6Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztnK?= zz.))s	Subject: N)s������� � ��������r|)s zz.Nr�	)r5r6r��parts�hdrs&    r8�test_whitespace_keeper�!TestHeader.test_whitespace_keeperYsK��
�
�
��U���a� ��
�5�Y�	Z��%� ��
�3�:�:�<�C�	Er;c�\�UOoQoU[O[U2P!)zXSubject: =?EUC-KR?B?CSixpLDtKSC/7Liuvsax4iC6uLmwMcijIKHaILzSwd/H0SC8+LCjwLsgv7W/+Mj3I ?=)r�rr�r)r5rr�s&  r8�test_broken_base64_header�$TestHeader.test_broken_base64_headerbs$���"�"��f���v�&�&�
�q�9r;c�b�[QQQ5oUOUO2Q2P!)r��	shift_jisr�r�r�r�s& r8�test_shift_jis_charset�!TestHeader.test_shift_jis_charsetgs%���5�+�.���������%E�Fr;c�j�[OQ2oUO[U2Q2P!)zEmptyHeader:zEmptyHeader: 

)r�rr1r�rns& r8�!test_flatten_header_with_no_value�,TestHeader.test_flatten_header_with_no_valueks)���'�'��7������S��#6�7r;c�\�[2oQUQ$UO[U2Q2P!)z   value with leading ws�
SomeHeaderz&SomeHeader:    value with leading ws

)rr1r�rns& r8�)test_encode_preserves_leading_ws_on_value�4TestHeader.test_encode_preserves_leading_ws_on_valuers(���i��6��L������S��#M�Nr;c�Z�UO[Q2O2Q2P!r	r�	rMs&r8�test_whitespace_header�!TestHeader.test_whitespace_headerws��������+�+�-�s�3r;rf)rgrhrirjr�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r
r
r	
r
r
r
r
r
r 
r#
rkrlrms@r8r�	r�	s�����7�6�8�-�=�~)���&C2�J42�l��7�
�O�O�P�)��E�:�
G�8�O�
4�4r;r�	c��`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Q s"Us#P!)!�TestRFC2231i}c��UOoUOQ2oUUOQ2Q2UUOQP
Q5Q2P!)z
msg_29.txtrrN�rOr	�%This is even more ***fun*** isn't it!)rOr	z'"This is even more ***fun*** isn't it!")r1r2rIr4s&  r8rG�TestRFC2231.test_get_param�sM��
�
�
���l�l�<�(��
�3�=�=��!�G�	I�
�3�=�=��%�=�0�I�	Kr;c�d�UOo[2oUOQQQQ5UUOQ2Q	2UOQQQQQ5UUOQ2Q
2UO	Q2oUOQQQQQ5UUO]NQ5Q2P!)rr)
rOr�r	�rA�languager�ra"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
)rOr;r)
r(
)r�rrqrIr2r�r4s&  r8rr�TestRFC2231.test_set_param�s���
�
"�
"���i���
�
�g�G�(�	�	*�
�3�=�=��!�E�	G��
�
�g�G�(�4�	�	9�
�3�=�=��!�G�	I��l�l�<�(���
�
�g�G�(�4�	�	9�
�3�=�=�b�=�)�,�	r;c�&�[2oUOQQ2UOUQ*Q2UOQQP
Q5UOUQ*Q2UOQQP
Q5UOUQ*Q2P!)	rr�r@ztext/plain; title="foo"r7)�requoteztext/plain; title=barz	(bar)bellztext/plain; title="(bar)bell")rrqr1rns& r8�test_set_param_requote�"TestRFC2231.test_set_param_requote�s}���i���
�
�g�u�%�����^�,�.G�H��
�
�g�u�e�
�4�����^�,�.E�F��
�
�g�{�E�
�:�����^�,�.M�Nr;c���UOoUOQ2oUOQQQQQ5UOQQQQQ5UOQQQ	5UUO	]NQ
5Q2P!)r�r�r7rOr	r,
rr)
rDr4ra$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
)r�r2rqr|r�r4s&  r8r~�TestRFC2231.test_del_param�st��
�
"�
"���l�l�<�(���
�
�e�U�J��
�F��
�
�g�G���	�	/��
�
�e�N�
�3�
�3�=�=�b�=�)�,�	r;c�p�UOoUOQ2oUUO2Q2P!)rwrO)r1r2�get_content_charsetr4s&  r8� test_rfc2231_get_content_charset�,TestRFC2231.test_rfc2231_get_content_charset�s.��
�
�
���l�l�<�(��
�3�"�"�$�j�1r;c���[OQ2o[OU2oUO	UO2Q2UO	VO
22P!)z�            Content-Disposition: inline;
            	filename*0*=''This%20is%20even%20more%20;
            	filename*1*=%2A%2A%2Afun%2A%2A%2A%20;
            	filename*2="is it not.pdf"

            �)This is even more ***fun*** is it not.pdf�r�r�r�rr1r�r�r�s&  r8�test_rfc2231_parse_rfc_quoting�*TestRFC2231.test_rfc2231_parse_rfc_quoting��X���O�O��
���'�'��*������)�)�+�D�	F�����M�M�O�,r;c���[OQ2o[OU2oUO	UO2Q2UO	VO
22P!)z�            Content-Disposition: inline;
            	filename*0*="''This%20is%20even%20more%20";
            	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
            	filename*2="is it not.pdf"

            r:
r;
r�s&  r8� test_rfc2231_parse_extra_quoting�,TestRFC2231.test_rfc2231_parse_extra_quoting�r>
r;c��Qo[OU2oUOQ2oUOU[2UOUQ2P!)aContent-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm"
Content-Type: text/html; NAME*0=file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEM; NAME*1=P_nsmail.htm

�NAMEzMfile____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm�r�rrI�assertNotIsInstance�tupler1�r5r�r7�params&   r8�#test_rfc2231_no_language_or_charset�/TestRFC2231.test_rfc2231_no_language_or_charset�sN��
���'�'��*���
�
�f�%��� � ���.�����[�	]r;c�x�Qo[OU2oUOUO2Q2P!�z�Content-Disposition: inline;
	filename*0*="''This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

r:
r&r�s&  r8�/test_rfc2231_no_language_or_charset_in_filename�;TestRFC2231.test_rfc2231_no_language_or_charset_in_filename�8��
���'�'��*������)�)�+�D�	Fr;c�x�Qo[OU2oUOUO2Q2P!rL
r&r�s&  r8�7test_rfc2231_no_language_or_charset_in_filename_encoded�CTestRFC2231.test_rfc2231_no_language_or_charset_in_filename_encodedrO
r;c�x�Qo[OU2oUOUO2Q2P!)z�Content-Disposition: inline;
	filename*0="''This%20is%20even%20more%20";
	filename*1*="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

z1This%20is%20even%20more%20***fun*** is it not.pdfr&r�s&  r8�test_rfc2231_partly_encoded�'TestRFC2231.test_rfc2231_partly_encoded's9��
���'�'��*���������?�	Ar;c�x�Qo[OU2oUOUO2Q2P!)z�Content-Disposition: inline;
	filename*0="This%20is%20even%20more%20";
	filename*1="%2A%2A%2Afun%2A%2A%2A%20";
	filename*2="is it not.pdf"

z?This%20is%20even%20more%20%2A%2A%2Afun%2A%2A%2A%20is it not.pdfr&r�s&  r8�test_rfc2231_partly_nonencoded�*TestRFC2231.test_rfc2231_partly_nonencoded4s9��
���'�'��*���������M�	Or;c�x�Qo[OU2oUOUO2Q2P!)z�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"

r:
r.r�s&  r8�/test_rfc2231_no_language_or_charset_in_boundary�;TestRFC2231.test_rfc2231_no_language_or_charset_in_boundaryArO
r;c�x�Qo[OU2oUOUO2Q2P!)z�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"

z)this is even more ***fun*** is it not.pdf�r�rr1r6
r�s&  r8�.test_rfc2231_no_language_or_charset_in_charset�:TestRFC2231.test_rfc2231_no_language_or_charset_in_charsetMs8��
���'�'��*������0�0�2�D�	Fr;c�x�Qo[OU2oUOUO2Q2P!)z�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"

r:
r&r�s&  r8�%test_rfc2231_bad_encoding_in_filename�1TestRFC2231.test_rfc2231_bad_encoding_in_filename[rO
r;c�x�Qo[OU2oUOUO2P2P!)z:Content-Type: text/plain; charset*=bogus''utf-8%E2%80%9D

r]
r�s&  r8�$test_rfc2231_bad_encoding_in_charset�0TestRFC2231.test_rfc2231_bad_encoding_in_charsetg�6��
���'�'��*��	
����0�0�2�D�9r;c�x�Qo[OU2oUOUO2P2P!)z:Content-Type: text/plain; charset*=ascii''utf-8%E2%80%9D

r]
r�s&  r8�%test_rfc2231_bad_character_in_charset�1TestRFC2231.test_rfc2231_bad_character_in_charsetqrf
r;c�x�Qo[OU2oUOUO2Q2P!)z�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�r&r�s&  r8�&test_rfc2231_bad_character_in_filename�2TestRFC2231.test_rfc2231_bad_character_in_filename{s8��
���'�'��*������)�)�+�J�	Lr;c�x�Qo[OU2oUOUO2Q2P!)z^Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename*=X-UNKNOWN''myfile.txt

�
myfile.txtr&r�s&  r8�test_rfc2231_unknown_encoding�)TestRFC2231.test_rfc2231_unknown_encoding�s4��
��
�'�'��*������)�)�+�\�:r;c��Qo[OU2o[OP[129^tt^2UOUO
2Q2PPP2P!)%fhP!9h)ucContent-Transfer-Encoding: 8bit
Content-Disposition: inline; filename*=utf-8���''myfile.txt

rn
)r�rr%�check_warnings�DeprecationWarningr1r�r�s&  r8�&test_rfc2231_bad_character_in_encoding�2TestRFC2231.test_rfc2231_bad_character_in_encoding�s[��
��
�'�'��*��
�
+�
+�R�1C�,D�
E�
E����S�-�-�/��>�F�
E�
E�
E�s�!A)�)A:	�2A:	c��UOoQo[OU2oUOQ2vqEoUUP2UUP2UUQ2P!)zJContent-Type: application/x-foo;
	name*0*="Frank's"; name*1*=" Document"

rJ�Frank's DocumentrF�r5r6r�r7rAr-
r�s&      r8�-test_rfc2231_single_tick_in_filename_extended�9TestRFC2231.test_rfc2231_single_tick_in_filename_extended�sX��
�
�
��
��
�'�'��*��"�}�}�V�4���1�
�7�D��
�8�T��
�1� �!r;c��Qo[OU2oUOQ2oUOU[2UOUQ2P!)zGContent-Type: application/x-foo; name*0="Frank's"; name*1=" Document"

rJrw
rD
rG
s&   r8�$test_rfc2231_single_tick_in_filename�0TestRFC2231.test_rfc2231_single_tick_in_filename�sJ��
���'�'��*���
�
�f�%��� � ���.����� 2�3r;c�x�Qo[OU2oUOUO2Q2P!)zAContent-Disposition: inline;
	filename*0*="'This%20is%20broken";
z'This is brokenr&r�s&  r8�test_rfc2231_missing_tick�%TestRFC2231.test_rfc2231_missing_tick�s8��
���'�'��*����������	r;c�x�Qo[OU2oUOUO2Q2P!)zAContent-Disposition: inline;
	filename*0*="'This%20is%E2broken";
u'This is�brokenr&r�s&  r8�0test_rfc2231_missing_tick_with_encoded_non_ascii�<TestRFC2231.test_rfc2231_missing_tick_with_encoded_non_ascii�s8��
���'�'��*���������"�	$r;c��UOoQo[OU2oUOQ2vqEoUUQ2UUQ2UUQ2P!)zYContent-Type: application/x-foo;
	name*0*="us-ascii'en-us'Frank's"; name*1*=" Document"

rJrO�en-usrw
rFrx
s&      r8�!test_rfc2231_tick_attack_extended�-TestRFC2231.test_rfc2231_tick_attack_extended�sX��
�
�
��
��
�'�'��*��"�}�}�V�4���1�
�7�J��
�8�W��
�1� �!r;c��Qo[OU2oUOQ2oUOU[2UOUQ2P!)zWContent-Type: application/x-foo;
	name*0="us-ascii'en-us'Frank's"; name*1=" Document"

rJzus-ascii'en-us'Frank's DocumentrD
rG
s&   r8�test_rfc2231_tick_attack�$TestRFC2231.test_rfc2231_tick_attack�sJ��
��
�'�'��*���
�
�f�%��� � ���.����� A�Br;c��UOoQo[OU2oUUOQ2Q2P!)z:Content-Type: application/x-foo; name="Frank's Document"

rJrw
rFr?s&   r8�test_rfc2231_no_extended_values�+TestRFC2231.test_rfc2231_no_extended_values�s:��
�
�
��
���'�'��*��
�3�=�=�� �"4�5r;c��UOoQo[OU2oUOQ2vqEoUUQ2UUQ2UUQ2P!)ziContent-Type: application/x-foo;
	name*0*="us-ascii'en-us'My";
	name*1=" Document";
	name*2*=" For You"

rJrOr�
�My Document For YourFrx
s&      r8�,test_rfc2231_encoded_then_unencoded_segments�8TestRFC2231.test_rfc2231_encoded_then_unencoded_segments��X��
�
�
��
���'�'��*��"�}�}�V�4���1�
�7�J��
�8�W��
�1�#�$r;c��UOoQo[OU2oUOQ2vqEoUUQ2UUQ2UUQ2P!)ziContent-Type: application/x-foo;
	name*0="us-ascii'en-us'My";
	name*1*=" Document";
	name*2*=" For You"

rJrOr�
r�
rFrx
s&      r8�,test_rfc2231_unencoded_then_encoded_segments�8TestRFC2231.test_rfc2231_unencoded_then_encoded_segments�r�
r;c	��QQ,oSFD<oUOUQ59^tt^2[OU2oPPP2J>	P!)%fhJS9h)z�From: user@host.com
To: user@host.com
Bad-Header:
 =?us-ascii?Q?LCSwrV11+IB0rSbSker+M9vWR7wEDSuGqmHD89Gt=ea0nJFSaiz4vX3XMJPT4vrE?=
 =?us-ascii?Q?xGUZeOnp0o22pLBB7CYLH74Js=wOlK6Tfru2U47qR?=
 =?us-ascii?Q?72OfyEY2p2=2FrA9xNFyvH+fBTCmazxwzF8nGkK6D?=

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

�� ����� � ���� ������ ��� ��������
)r�)r[r�r)r5�messagesr�r7s&   r8�+test_should_not_hang_on_invalid_ew_messages�7TestRFC2231.test_should_not_hang_on_invalid_ew_messagessR������"�A������"�"��/�/��2��#�"��"�"�"�s�A	�A
�A
rf)$rgrhrirjrGrrr1
r~r7
r<
r@
rI
rM
rQ
rT
rW
rZ
r^
ra
rd
rh
rk
ro
rt
ry
r|
r
r�
r�
r�
r�
r�
r�
r�
rkrlrms@r8r&
r&
}s�����K�#�JO��B2�-�-� ]�
F�
F�A�O�
F�F�
F�:�:�
L�;�?�"�4��$�"�	C�6�
%�"
%�3�3r;r&
c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�
TestSignedi%c��[UQQ59^tt^2oUO2o[OU2oPPP2V41!)%fhWW1!9hrDrE)r5rr��originalr7s&&   r8�_msg_and_obj�TestSigned._msg_and_obj'sP��
�h��
1�
1�R��w�w�y�H��+�+�H�5�C�2��}��2�
1���}��s�'A	�	A	�A	c��]PHoUOQUOUO*2oUO	U2O]2oUO	U2O]2oUO
Ve2P!)rz^--([^\n]+)\n(.*?)\n--\1$)rXrY�Sri�search�groupr1)r5r�
�resultrX�repart�inpart�outparts&&&    r8�_signed_parts_eq�TestSigned._signed_parts_eq-sb������8�"�$�$����+�F�����x�(�.�.�q�1���-�-��'�-�-�a�0������)r;c�p�UOQ2vqUO2oUOV2P!r��r�
r�r�
�r5r�
r7r�
s&   r8�test_long_headers_as_string�&TestSigned.test_long_headers_as_string5s-���)�)�,�7�
����������h�/r;c�t�UOQ2vqUO]<Q5oUOV2P!)r�rr�
r�
s&   r8�(test_long_headers_as_string_maxheaderlen�3TestSigned.test_long_headers_as_string_maxheaderlen:s2���)�)�,�7�
�����B��/�����h�/r;c��UOQ2vq[2o[U2OU2UO	2oUOV2P!r�)r�
rr
r�r�r�
)r5r�
r7r�r�
s&    r8�test_long_headers_flatten�$TestSigned.test_long_headers_flatten?sF���)�)�,�7�
��
�Z���"�
���c�"���������h�/r;rf)rgrhrirjr�
r�
r�
r�
r�
rkrlrms@r8r�
r�
%s#�����*�0�
0�
0�0r;r�
c�(`�\sQsQsnQsQsUsP!)�TestHeaderRegistryiFc��[2oUQQ2oUOUO]*[O2P!)r�zattachment; 0*00="foo")rr	r
rr�)r5�regr�s&  r8�test_HeaderRegistry�&TestHeaderRegistry.test_HeaderRegistryHs6������%�'?�@�����a�i�i��l�F�,F�,F�Gr;rf)rgrhrirjr�
rkrlrms@r8r�
r�
Fs����H�Hr;r�
�__main__)hrXr�rZr�r��iorr�	itertoolsr�randomr�	threadingr�
unittest.mockrr��email.policy�email.utils�
email.charsetr	�email.generatorr
rr�email.headerr
rr�email.headerregistryr�
email.messager�email.mime.applicationr�email.mime.audior�email.mime.baser�email.mime.imager�email.mime.messager�email.mime.multipartr�email.mime.nonmultipartr�email.mime.textr�email.parserrrrrrr r!r"r
r#�test.supportr$r%�test.support.os_helperr&�test.test_emailr'r(r)r�r)r�r-�TestCaserpr�rKrfr�r�r�r�r_r�r�r:rBr�r&rTrmr�rMrVr[r]rwr�	r�	r&
r�
r�
rg�mainrfr;r8�<module>r�
s���

��
��� ��������!�G�G�;�;�/�!�2�&�$�&�*�.�4�$�-��������)�(�)�3�3�$�	������{N�]�{N�@?�8�$�$�?�Fx>�m�x>�zK/�x�(�(�K/�^/D�H�%�%�/D�h7D�H�%�%�7D�vXC�(�+�+�XC�x7A�8�$�$�7A�x~6�M�~6�Bt1�
�t1�rIH�-�IH�ZsK�m�sK�n		J�}�	J�"Z-�]�Z-�~lH�
�lH�`d(�M�d(�N-A�m�-A�`QF�-�QF�hj�M�j�Z
-�-�$3�%E�$2�3�8�'G�'5�8�1D��"�"�1D�hF
��"�"�F
�V
mF�(�#�#�mF�da4��a4�Lb3�-�b3�P
0��0�BH��H��z���M�M�O�r;

Youez - 2016 - github.com/yon3zu
LinuXploit