403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
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:/Python313/Lib/test/test_email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/test_email/__pycache__/test_headerregistry.cpython-313.opt-2.pyc
�

��i�
���SSKrSSKrSSKrSSKJr SSKJr SSKJr SSKJ	r	J
r
 SSKJr SSKJ
r
Jr SSKJr SS	KJr \"5r"S
S\	5r"SS
\	5r"SS\5r\
"SS\55r\
"SS\55r\
"SS\55r\
"SS\55r\
"SS\55r\
"SS\55r\
"SS\55r"SS\	5r"S S!\5r \!S":Xa\RD"5 gg)#�N)�errors��policy)�Message)�
TestEmailBase�parameterize)�headerregistry)�Address�Group)�
decode_header)�	ALWAYS_EQc�f�\rSrSrSrSr"SS5rSr"SS5rS	r	S
r
SrSrS
r
g)�TestHeaderRegistry�c��[R"5nU"SS5nURU[R5 URU[R5 g�N�foobar�test�r	�HeaderRegistry�assertIsInstance�
BaseHeader�UnstructuredHeader��self�factory�hs   �8C:\Python313\\Lib\test\test_email\test_headerregistry.py� test_arbitrary_name_unstructured�3TestHeaderRegistry.test_arbitrary_name_unstructuredsH�� �/�/�1���H�f�%�����a��!:�!:�;����a��!B�!B�C�c��[R"5nURSUR5 U"SS5nUR	U[R
5 UR	U[R5 g)N�Subjectr)r	r�assertNotIn�registryrr�UniqueUnstructuredHeaderrs   r�test_name_case_ignored�)TestHeaderRegistry.test_name_case_ignoreds^�� �/�/�1������G�$4�$4�5��I�v�&�����a��!:�!:�;����a��!H�!H�Ir!c��\rSrSrSrSrg)�TestHeaderRegistry.FooBase�!c��g�N�)r�args�kws   r�__init__�#TestHeaderRegistry.FooBase.__init__"s��r!r.N)�__name__�
__module__�__qualname__�__firstlineno__r1�__static_attributes__r.r!r�FooBaser*!s��	r!r8c���[R"URS9nU"SS5nURX R5 URU[R5 g)N)�
base_classrr)r	rr8rrrs   r� test_override_default_base_class�3TestHeaderRegistry.test_override_default_base_class%sJ�� �/�/�4�<�<�H���H�f�%�����a���.����a��!B�!B�Cr!c�@�\rSrSr\R
RrSrg)�TestHeaderRegistry.FooDefault�+r.N)r3r4r5r6r	r�parser7r.r!r�
FooDefaultr>+s���1�1�7�7�r!rAc���[R"URS9nU"SS5nURU[R5 URX R5 g)N��
default_classrr)r	rrArrrs   r�test_override_default_class�.TestHeaderRegistry.test_override_default_class.sJ�� �/�/�d�o�o�N���H�f�%�����a��!:�!:�;����a���1r!c���[R"URS9nU"SS5nURU[R5 URU[R
5 g)NrC�subjectr)r	rrArrr&rs   r�2test_override_default_class_only_overrides_default�ETestHeaderRegistry.test_override_default_class_only_overrides_default4sN�� �/�/�d�o�o�N���I�v�&�����a��!:�!:�;����a��!H�!H�Ir!c��[R"SS9nU"SS5nURU[R5 URU[R5 g)NF)�use_default_maprHrrrs   r�test_dont_use_default_map�,TestHeaderRegistry.test_dont_use_default_map:sJ�� �/�/��F���I�v�&�����a��!:�!:�;����a��!B�!B�Cr!c��[R"5nU"SS5nURS[R5 U"SS5nUR	U[R
5 UR	U[R5 UR	U[R
5 UR	U[R5 gr)r	r�map_to_typer&rrr)rr�h1�h2s    r�test_map_to_type�#TestHeaderRegistry.test_map_to_type@s��� �/�/�1��
�X�v�
&�����H�n�&M�&M�N�
�X�v�
&�����b�.�";�";�<����b�.�"C�"C�D����b�.�";�";�<����b�.�"I�"I�Jr!r.N)r3r4r5r6rr'r8r;rArErIrMrSr7r.r!rrrs?��D�J���D�8�8�2�J�D�Kr!rc�<�\rSrSr\R
"5rSrSrg)�TestHeaderBase�Kc�$�URX5$r-)r)r�name�values   r�make_header�TestHeaderBase.make_headerOs���|�|�D�(�(r!r.N)	r3r4r5r6r	rrr[r7r.r!rrVrVKs���+�+�-�G�)r!rVc�>�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�TestBaseHeaderFeatures�Sc��URSS5nURU[5 URUS5 UR[U5S5 g�NrH�this is a test)r[r�str�assertEqual�rrs  r�test_str�TestBaseHeaderFeatures.test_strUsK�����Y�(8�9�����a��%�����,�-�����Q��!1�2r!c�R�URSS5nURUSSS5 g)NrHrb���is)r[rdres  r�test_substr�"TestBaseHeaderFeatures.test_substr[s+�����Y�(8�9������1�Q���&r!c�`�URSS5nURURS5 gra)r[rdrYres  r�
test_has_name�$TestBaseHeaderFeatures.test_has_name_s)�����Y�(8�9���������+r!c��URSS5nUR[5 [X!S5 SSS5 g!,(df   g=f)NrHrb�foo)r[�assertRaises�AttributeError�setattr)r�attrrs   r�
_test_attr_ro�$TestBaseHeaderFeatures._test_attr_rocs9�����Y�(8�9��
�
�
�~�
.��A�U�#�/�
.�
.�s	�
>�
Ac�&�URS5 g)NrY�rw�rs r�test_name_read_only�*TestBaseHeaderFeatures.test_name_read_onlyhs�����6�"r!c�&�URS5 g)N�defectsrzr{s r�test_defects_read_only�-TestBaseHeaderFeatures.test_defects_read_onlyks�����9�%r!c�`�URSS5nUR[UR5S5 UR	UR[
5 URSS5nUR[UR5S5 UR	UR[
5 g)NrHrbr�date��)r[rd�lenrr�tupleres  r�test_defects_is_tuple�,TestBaseHeaderFeatures.test_defects_is_tuplens�����Y�(8�9������Q�Y�Y���+����a�i�i��/����V�R�(������Q�Y�Y���+����a�i�i��/r!r.N)r3r4r5r6rfrlrorwr|r�r�r7r.r!rr^r^Ss%��3�'�,�$�
#�&�0r!r^c�8�\rSrSrSrSS/S4SS/S4SS	S
.rSrg)
�TestUnstructuredHeader�c�L�[U5nUS:�aUSO/nSU(aSOS-nXdS:�aUSOU-S-nURSU5nURX�5 URURU5 URUR[RS9U5 g)	NrzSubject:� r�r��
r#r)r�r[rd�assertDefectsEqualr�foldr�default)	r�source�decodedr/�lr�header�foldedrs	         r�string_as_value�&TestUnstructuredHeader.string_as_value�s���
��I���q�S�$�q�'�b���f�s�"�5����c�4��7�v�6��=�����Y��/������$�����	�	�7�3�������v�~�~��6��?r!z=?utf-8?q?this_is_a_test?=rbz!=?gb2312?b?1eLKx9bQzsSy4srUo6E=?=u这是中文测试!z(=?utf-8?b?6L+Z5piv5Lit5paH5rWL6K+V77yB?=)z=?utf-8?q?=C3=89ric?=�Éric)z$The =?utf-8?q?=C3=89ric=2C?= Himself�The Éric, Himself)�rfc2047_simple_quopri�rfc2047_gb2312_base64�rfc2047_simple_nonascii_quopri� rfc2047_quopri_with_regular_textr.N)r3r4r5r6r��
string_paramsr7r.r!rr�r��s?��@� 
)����	"�
0�8��6�	"8�+�-"�%�Mr!r�c
��\rSrSrSr\R"SS9r\R"\5r	\R
"SSSSS	S
\	S9r
SrS
rSr
SrSrSrSrSrSrSrg)�TestDateHeader�zSun, 23 Sep 2001 20:10:55 -0700i����)�hoursi��	���
�7)�tzinfoc�^�URSUR5nURXR5 URURUR5 URURR5UR
5 URURS5 g�Nr�r.)r[�
datestringrd�datetime�dt�	utcoffsetrres  r�test_parse_date�TestDateHeader.test_parse_date�sw�����V�T�_�_�5������O�O�,�������T�W�W�-�������-�-�/����@�������B�'r!c��URSUR5nURXR5 URURUR5 URUR
S5 gr�)r[r�rdr�r�rres  r�test_set_from_datetime�%TestDateHeader.test_set_from_datetime�sV�����V�T�W�W�-������O�O�,�������T�W�W�-�������B�'r!c���URSUR5nURU[R5 URURS5 URURS5 g)Nr�r�r.)r[r�rr	�UniqueDateHeaderrd�	max_countrres  r�test_date_header_properties�*TestDateHeader.test_date_header_properties�sV�����V�T�_�_�5�����a��!@�!@�A�������a�(�������B�'r!c���URSUR5nURU[R5 URURS5 URURS5 g)Nzresent-dater.)r[r�rr	�
DateHeaderrdr�rres  r�"test_resent_date_header_properties�1TestDateHeader.test_resent_date_header_properties�sV�����]�D�O�O�<�����a��!:�!:�;�������d�+�������B�'r!c���URSS5nUR[UR5S5 UR	URS[
R5 g)Nr�r�r�r)r[rdr�rrr�HeaderMissingRequiredValueres  r�test_no_value_is_defect�&TestDateHeader.test_no_value_is_defect�sJ�����V�R�(������Q�Y�Y���+����a�i�i��l�F�,M�,M�Nr!c�(�SnURSU5nURX!5 URUR5 UR[	UR
5S5 UR
UR
S[R5 g)NzNot a date headerr�r�r�	r[rd�assertIsNoner�r�rrr�InvalidDateDefect�r�srs   r�test_invalid_date_format�'TestDateHeader.test_invalid_date_format�so�������V�Q�'����������!�*�*�%�����Q�Y�Y���+����a�i�i��l�F�,D�,D�Er!c�(�SnURSU5nURX!5 URUR5 UR[	UR
5S5 UR
UR
S[R5 g)NzTue, 06 Jun 2017 27:39:33 +0600r�r�rr�r�s   r�test_invalid_date_value�&TestDateHeader.test_invalid_date_value�so��-�����V�Q�'����������!�*�*�%�����Q�Y�Y���+����a�i�i��l�F�,D�,D�Er!c��URSUR5nUR[5 SUlSSS5 g!,(df   g=f)Nr�rr)r[r�rsrtr�res  r�test_datetime_read_only�&TestDateHeader.test_datetime_read_only�s9�����V�T�_�_�5��
�
�
�~�
.��A�J�/�
.�
.�s�A�
Ac���[[RS9nURUS'UR	USUR
5 UR	USRUR5 g)Nr�Date)rrr�r�rdr�r�)r�ms  r�"test_set_date_header_from_datetime�1TestDateHeader.test_set_date_header_from_datetime�sS���6�>�>�*���G�G��&�	�����6��D�O�O�4�����6��+�+�T�W�W�5r!r.N)r3r4r5r6r�r��	timedeltar��timezone�tzr�r�r�r�r�r�r�r�r�r�r7r.r!rr�r��su��3�J��"�"��,�I�	�	�	�9�	%�B�	�	�	�4��B��B��2�	>�B�(�(�(�(�O�
F�F��
6r!r�c�T�\rSrSrSr0SSSSSSS	0/S
4_SSSSSSS	0/S
4_S
S
SSSSS	04_SSSSS0\R/4_SSSSS0\R/4_SSSSS0\R/4_SSSSS0\R/4_SS_SS_SS_SS_SSSSSSS 04_S!S"SSSSS#04_S$S%SSSSS&04_S'S(SSSSS 0/S)4_S*S+SSSS,S0/S-4_S.S/SSSS,S004_0S1S2SSSS,S304_S4S5SSSS6S6S7.\R/S8-4_S9S:S;S<S=S>S?0/S@4_SASBSCSDSESFSGSHSI./SJSK4_SLSMSCSDSESFSGSHSNSO./SMSP4_SQSRSCSDSESSST04_SUSVSCSDSESSSW04_SXSYSCSDSESSSZ0/SY4_S[S\RS]5RS	S^5S_S`SaSbScSd.\R/S8-SeSf4_SgShSCSDSESSSi0/Sj4_SkSlSCSDSESaSm0/Sn4_SoSpRS]5RS	S^5SSSS	SqSr.\R/SsSt4_SuSvSSSSS	0/S
4_SwSxSSSSSSy0/Sz4_S{S|SSSSSS}0\R/S~-S4_S�S�SSSS	S�Sr.\R/S~-S�S�4_S�S�S�S�S�SSS�0\R/S~-S�4_ES�S�S�S�SSS�0/S�4S�SSSSSS�0\R/S�4S�SSSSSS�0\R/S~-S�4S�SSSSSS�0\R/S~-S�4S�SSSSSS�0\R/S�S�4S�SSSSSS�0/S�4S�SSSSS�0\R/S�S�4S�SSSSS�0\R/S�S�4S�SSSSS�0/S�S�4S�S�S�S�SSS�0\R/S�4S�S�S�S�SSS�0\R/S8-S�4S�S�S�S�SSS�0\R/S~-S�4S�S�S�S�SSS�0/S�S�4S�.
Er
S�rg�)��TestContentTypeHeader��c���[U5nUS:�aUSO0nUS:�aUSO/nUS:�aUS[LaUSOUn	U(aSOSn
US:�aUSOX�-S-nURSU5nURURU5 URUR
U5 URURU5 URURU5 UR[5 S	URS
'SSS5 URURU5 URX�5 URUR[RS9U5 g!,(df   Ni=f)Nrr��zContent-Type: r��r�zContent-Type�xyz�abcr)r��DITTOr[rd�content_type�maintype�subtype�paramsrs�	TypeErrorr�rr�rr�)
rr�r�r�r�r/r��parmdictrr�r�r�rs
             r�content_type_as_value�+TestContentTypeHeader.content_type_as_value�s:��
��I����c�4��7�r����c�4��7�r����c�d�1�g�U�&:�4��7���*0�&�b���a�C��a��V�%5��%<�����^�V�4���������6�������X�.�������G�,�������8�,�
�
�
�y�
)�#�A�H�H�U�O�*�����	�	�7�3�����$�������v�~�~��6��?�	*�
)�s�3E&�&
E4�
RFC_2045_1z)text/plain; charset=us-ascii (Plain text)�
text/plain�text�plain�charsetzus-asciiztext/plain; charset="us-ascii"�
RFC_2045_2ztext/plain; charset=us-ascii�
RFC_2045_3�no_subtype_in_content_typeztext/�no_slash_in_content_typerr�junk_text_in_content_typez<crazy "stuff">� too_many_slashes_in_content_typezimage/jpeg/foo�unknown_content_type)�	bad/namesr��bad�names�mixed_case_content_type)z
ImAge/JPeg�
image/jpeg�image�jpeg�spaces_in_content_type)z  text  /  plain  r�r�r��cfws_in_content_type)z"(foo) text (bar)/(baz)plain(stuff)r�r�r��
charset_paramztext/plain; charset="utf-8"zutf-8�capitalized_charsetztext/plain; charset="US-ASCII"zUS-ASCII�unknown_charsetztext/plain; charset="fOo"�fOo�*capitalized_charset_param_name_and_commentz*text/plain; (interjection) Charset="utf-8"ztext/plain; Charset="utf-8"�unquoted_param_valueztext/plain; title=foo�titleztext/plain; title="foo"�param_value_with_tspecialsz!text/plain; title="(bar)foo blue"z
(bar)foo blue�"param_with_extra_quoted_whitespacez0text/plain; title="  a     loong  way 	 home   "z  a     loong  way 	 home   �
bad_paramszblarg; baz; boor�)�baz�boor��spaces_around_param_equalsz0Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"zmultipart/mixed�	multipart�mixed�boundary�CPIMSSMTPC06p5f3tGz.Multipart/mixed; boundary="CPIMSSMTPC06p5f3tG"�spaces_around_semiszPimage/jpeg; name="wibble.JPG" ; x-mac-type="4A504547" ; x-mac-creator="474B4F4E"r�r�r�z
wibble.JPG�4A504547�474B4F4E)rY�
x-mac-type�
x-mac-creatorzNimage/jpeg; name="wibble.JPG"; x-mac-type="4A504547"; x-mac-creator="474B4F4E"z^Content-Type: image/jpeg; name="wibble.JPG"; x-mac-type="4A504547";
 x-mac-creator="474B4F4E"
�lots_of_mime_paramszmimage/jpeg; name="wibble.JPG"; x-mac-type="4A504547"; x-mac-creator="474B4F4E"; x-extrastuff="make it longer"zmake it longer)rYrrzx-extrastuffz}Content-Type: image/jpeg; name="wibble.JPG"; x-mac-type="4A504547";
 x-mac-creator="474B4F4E"; x-extrastuff="make it longer"
�semis_inside_quotesz$image/jpeg; name="Jim&amp;&amp;Jill"rYzJim&amp;&amp;Jill�single_quotes_inside_quotesz!image/jpeg; name="Jim 'Bob' Jill"zJim 'Bob' Jill�double_quotes_inside_quotesz#image/jpeg; name="Jim \"Bob\" Jill"zJim "Bob" Jill�non_ascii_in_paramsufoo§/bar; b§r=two; baz=thr§ezlatin-1�surrogateescapeu
foo�/barufoo��bar�twouthr�e)ub�rr	u&foo�/bar; b�r="two"; baz="thr�e"uVContent-Type: =?unknown-8bit?q?foo=A7?=/bar; b�r="two";
 baz*=unknown-8bit''thr%A7e
�rfc2231_segmented_normal_valuesz(image/jpeg; name*0="abc"; name*1=".html"zabc.htmlzimage/jpeg; name="abc.html"�quotes_inside_rfc2231_valuez.image/jpeg; bar*0="baz\"foobar"; bar*1="\"baz"zbaz"foobar"bazz"image/jpeg; bar="baz\"foobar\"baz"�non_ascii_rfc2231_valueuGtext/plain; charset=us-ascii; title*=us-ascii'en'This%20is%20not%20f§nuThis is not f�n)r�ru9text/plain; charset="us-ascii"; title="This is not f�n"z\Content-Type: text/plain; charset="us-ascii";
 title*=unknown-8bit''This%20is%20not%20f%A7n
�rfc2231_encoded_charsetz-text/plain; charset*=ansi-x3.4-1968''us-ascii� rfc2231_encoded_no_double_quotesz\text/plain;	name*0*=''This%20is%20;	name*1*=%2A%2A%2Afun%2A%2A%2A%20;	name*2="is it not.pdf"zThis is ***fun*** is it not.pdfz2text/plain; name="This is ***fun*** is it not.pdf"�"rfc2231_encoded_with_double_quoteszvtext/plain;	name*0*="us-ascii''This%20is%20even%20more%20";	name*1*="%2A%2A%2Afun%2A%2A%2A%20";	name*2="is it not.pdf"z)This is even more ***fun*** is it not.pdfr�z<text/plain; name="This is even more ***fun*** is it not.pdf"�)rfc2231_single_quote_inside_double_quotesz�text/plain; charset=us-ascii;	title*0*="us-ascii'en'This%20is%20really%20";	title*1*="%2A%2A%2Afun%2A%2A%2A%20";	title*2="isn't it!"z"This is really ***fun*** isn't it!zJtext/plain; charset="us-ascii"; title="This is really ***fun*** isn't it!"zZContent-Type: text/plain; charset="us-ascii";
 title="This is really ***fun*** isn't it!"
�3rfc2231_single_quote_in_value_with_charset_and_langzHapplication/x-foo;	name*0*="us-ascii'en-us'Frank's"; name*1*=" Document"zapplication/x-foo�applicationzx-foozFrank's Documentz*application/x-foo; name="Frank's Document"zFapplication/x-foo;	name*0="us-ascii'en-us'Frank's"; name*1=" Document"zus-ascii'en-us'Frank's Documentz9application/x-foo; name="us-ascii'en-us'Frank's Document"z/text/plain; NAME*0*=english_is_the_default.htmlzenglish_is_the_default.htmlz.text/plain; NAME="english_is_the_default.html"zjtext/plain;	name*0*="''This%20is%20even%20more%20";	name*1*="%2A%2A%2Afun%2A%2A%2A%20";	name*2="is it.pdf"z%This is even more ***fun*** is it.pdfz8text/plain; name="This is even more ***fun*** is it.pdf"zitext/plain;	name*0*="''This%20is%20even%20more%20";	name*1="%2A%2A%2Afun%2A%2A%2A%20";	name*2="is it.pdf"z3This is even more %2A%2A%2Afun%2A%2A%2A%20is it.pdfzFtext/plain; name="This is even more %2A%2A%2Afun%2A%2A%2A%20is it.pdf"zVContent-Type: text/plain;
 name="This is even more %2A%2A%2Afun%2A%2A%2A%20is it.pdf"
z1text/plain; name*0*=bogus'xx'ascii_is_the_default�ascii_is_the_defaultz'text/plain; name="ascii_is_the_default"z*text/plain; charset*=ascii''utf-8%F1%F2%F3uutf-8���u$text/plain; charset="utf-8���"z@Content-Type: text/plain; charset*=unknown-8bit''utf-8%F1%F2%F3
z*text/plain; charset*=ascii''utf-8%E2%80%9Duutf-8”utext/plain; charset="utf-8”"z@Content-Type: text/plain; charset*=unknown-8bit''utf-8%E2%80%9D
u-text/plain; charset*=utf-8”''utf-8%E2%80%9Dz9Content-Type: text/plain; charset*=utf-8''utf-8%E2%80%9D
zUapplication/x-foo;	name*0*="us-ascii'en-us'My";	name*1=" Document";	name*2=" For You"zMy Document For Youz-application/x-foo; name="My Document For You"zTapplication/x-foo;	name*0=us-ascii'en-us'My;	name*1*=" Document";	name*2*=" For You"zVapplication/x-foo;	name*0="us-ascii'en-us'My";	name*1*=" Document";	name*2*=" For You"z"us-ascii'en-us'My Document For Youz<application/x-foo; name="us-ascii'en-us'My Document For You"zrapplication/x-foo;	name="with spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaces"zXwith spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaceszrapplication/x-foo; name="with spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaceswith spaces"z�Content-Type: application/x-foo;
 name*0*=us-ascii''with%20spaceswith%20spaceswith%20spaceswith%20spaceswith;
 name*1*=%20spaceswith%20spaceswith%20spaceswith%20spaces
)
�)rfc2231_single_quote_in_non_encoded_value�rfc2231_no_language_or_charset�rfc2231_encoded_no_charset�rfc2231_partly_encoded�rfc2231_partly_encoded_2�(rfc2231_unknown_charset_treated_as_ascii�0rfc2231_bad_character_in_charset_parameter_value�8rfc2231_utf8_in_supposedly_ascii_charset_parameter_value�6rfc2231_nonascii_in_charset_of_charset_parameter_value�'rfc2231_encoded_then_unencoded_segments�'rfc2231_unencoded_then_encoded_segments�.rfc2231_quoted_unencoded_then_encoded_segments�+rfc2231_folded_segments_correctly_formattedr.N)r3r4r5r6r�r�InvalidHeaderDefect�encode�decode�UndecodableBytesDefect�content_type_paramsr7r.r!rr�r��sw��@�.[�	�7����
�
�#��,�.�	[�	�*����
�
�#��,�.�[�,	�,����
�
�#�%�-[�@	%������
�
'�
'�(�
'*�A[�P	#������
�
'�
'�(�
%*�Q[�`	$������
�
'�
'�(�
&*�a[�p	+������
�
'�
'�(�
-*�q[�L	�!�M[�\	"�$�][�h	!�#�i[�t	�!�u[�H	�)����
�� �"�I[�V	�,����
�
�#� %�W[�d	�'����
��� �e[�r	5�8����
�� ��)�7+�s[�R	�#����
�e���%�!�S[�f	%�/����
�o�&�'(�g[�t	-�?����
�5�6�/8�u[�B	������r�"�
�
'�
'�(��*�
,�C[�R	%�>����
�-�.��<�'�S[�f	�+����!�%�(�
*�
�+�+� �g[�H	�J����!�%�(�-�
/�
�J�J� �I[�p	�2����
�(�)� +�q[�~	&�1����
�%�&�((�[�L	&�2����
�%�&��2�(4�M[�^	��%�v�i�0���
�8I�2K�����|�4�
�
*�
*�+�A�-�4�
,�! �_[�J	*�6����
�Z� ��)�,+�K[�\	&�=����
�$�%��1�(3�][�n	"��#�V�I�.�v�v�j�5F�0H����"�-C�D��+�+�
,�
H�
>�
$�o[�L		"�=����
�
�#��,�$.�M	[�`		+�+�
���
�6�7��@�-�a	[�|		-�+�
���
�@�A�
�
'�
'�(��*�J�/�}	[�V
	4�(�
���"�-Q�R�
�
'�
'�(��*�=�A�6�W
[�v
	>�N����
�'�(�
�
'�
'�(��*�9�	@�w
[�NL����
�6�7��J�	6�
>����
�2�3�
�
'�
'�(�<�+>�'�
���
�<�=�
�
'�
'�(��*�F�'�'�
���
�<�=�
�
'�
'�(��*�F�#�'�
���
�J�K�
�
'�
'�(�K��%�$
@����
�+�,��5�57�
9����
�1�2�
�
*�
*�+�;�
7�
=�
9����
�
�#�
�
*�
*�+�,�
7�E�
<����
�
�#��,�
0�
C�&�
 ���
�*�+�
�
'�
'�(�;�4�"'�
 ���
�*�+�
�
'�
'�(��*�;�4�0'�
 ���
�9�:�
�
'�
'�(��*�L�;�$3����
�_�%��?�
J�
8�Y[�r!r�c�j�\rSrSrSrSSS\R/SS4SS\R/4SS	/4S
.rSr	g)
�TestContentTransferEncodingi$c��[U5nUS:�aUSO/nUS:�aUS[LaUSOUnU(aSOSnUS:�aUSOXq-S-nURSU5n	URU	RU5 URU	RU5 URX�5 URU	R[RS9U5 g)	Nrr�zContent-Transfer-Encoding: r�r�r�zContent-Transfer-Encodingr)
r�r�r[rd�cter�rr�rr�)
rr�r<r/r�rr�r�r�rs
          r�cte_as_value�(TestContentTransferEncoding.cte_as_value's���
��I����c�4��7�r����c�d�1�g�U�&:�4��7���7=�3�2���a�C��a��V�_�t�%;�����8�&�A���������$�����	�	�7�3�����$�������v�~�~��6��?r!)�base64r?r��7bitzContent-Transfer-Encoding:
z7bit and a bunch morezbase64 r?)�
RFC_2183_1�no_value�junk_after_cte�extra_space_after_cter.N)
r3r4r5r6r=rr�r4�
cte_paramsr7r.r!rr:r:$s\��
@�"�

��
�
.�
.�/��*��
$��
�
'�
'�(�*�
���"�'�Jr!r:c���\rSrSrSrSSSSSS./S	S
4SS0\R/SS
4SS0\R/4SSSS0\R/4SSSS0\R/S-SS4SSSS0\R/SS4S.rSr	g)�TestContentDispositioniQc��[U5nUS:�aUSO0nUS:�aUSO/nUS:�aUS[LaUSOUnU(aSOSnUS:�aUSOX�-S-n	URSU5n
URU
RU5 URU
R
U5 UR
U
RU5 URX�5 URU
R[RS	9U	5 g)
Nrr�r�zContent-Disposition: r�r�r�zContent-Dispositionr)r�r�r[rd�content_dispositionr�r�rr�rr�)rr�rIr/r�r�rr�r�r�rs           r�content_disp_as_value�,TestContentDisposition.content_disp_as_valueTs���
��I����c�4��7�r����c�4��7�r����c�d�1�g�U�&:�4��7���17�-�R���a�C��a��V�_�t�%;�����2�F�;������.�.�0C�D�������8�,�����	�	�7�3�����$�������v�~�~��6��?r!)�inlinerLzWattachment; filename=genome.jpeg;  modification-date="Wed, 12 Feb 1997 16:29:51 -0500";�
attachmentzgenome.jpegzWed, 12 Feb 1997 16:29:51 -0500)�filenamezmodification-datezWattachment; filename="genome.jpeg"; modification-date="Wed, 12 Feb 1997 16:29:51 -0500"znContent-Disposition: attachment; filename="genome.jpeg";
 modification-date="Wed, 12 Feb 1997 16:29:51 -0500"
r�NzContent-Disposition:
zab./kzab.zab./k; filename="foo"rNrrzaattachment; filename="=?UTF-8?Q?Schulbesuchsbest=C3=A4ttigung=2E?=               =?UTF-8?Q?pdf?="uSchulbesuchsbestättigung.pdfr�u4attachment; filename="Schulbesuchsbestättigung.pdf"zUContent-Disposition: attachment;
 filename*=utf-8''Schulbesuchsbest%C3%A4ttigung.pdf
z<attachment; filename="File =?utf-8?q?Name?= With Spaces.pdf"zFile Name With Spaces.pdfz0attachment; filename="File Name With Spaces.pdf"zFContent-Disposition: attachment; filename="File Name With Spaces.pdf"
)rA�
RFC_2183_2rB�
invalid_value�invalid_value_with_params�+invalid_parameter_value_with_fws_between_ew�'parameter_value_with_fws_between_tokensr.)
r3r4r5r6rJrr�r4�content_disp_paramsr7r.r!rrGrGQs���@�*�
F��&�"C�
E��G�F��
���
�
.�
.�/��$�
&�
���
�
'�
'�(�	*�
$��
���
�
'�
'�(�	&*�
.��
�8�9�
�
'�
'�(��*�
C�G�	8�
K��
�4�5�
�
'�
'�(�>�
V�
4�i<�r!rGc��\rSrSrSrSSSSS/4SSSSS/4SSSSS/4SSSSS/4S	S	S	SS/4S
S
S
SS/4SSSSS/4S
S
SSS/4SSSSS\R/4SSSSS\R/4SSSSS\R/4SSSSS\R/4SSSSS\R/4SSSSS\R/4SSSSS\R/4S.rSr	g)�TestMIMEVersionHeaderi�c��URSU5nURXr5 URURU5 URURU5 URURU5 URURU5 U(aSU-nURUR[RS9SU-S-5 g)NzMIME-Versionr�rz
MIME-Version:r�)
r[rd�version�major�minorr�rr�rr�)rr�r�rXrYrZrrs        r�version_string_as_MIME_Version�4TestMIMEVersionHeader.version_string_as_MIME_Version�s���
���^�V�4������$�������G�,�������%�(�������%�(�����	�	�7�3���6�\�F�������v�~�~��6�(�6�1�D�8�	:r!z1.0r�rz1.0 (produced by MetaSend Vx.x)z(produced by MetaSend Vx.x) 1.0z1.(produced by MetaSend Vx.x)0z1.1z2.1r�z1 .0z  1.0  z	1.0 <abc>z	<abc> 1.0Nz1.<abc>0z1..0z2.xrrr�)r�r�r��
RFC_2045_4�1_1�2_1�
whitespace�#leading_trailing_whitespace_ignored�non_comment_garbage_after�non_comment_garbage_before�non_comment_garbage_inside�two_periods�2_xrr�missingr.)
r3r4r5r6r[rr4r��version_string_paramsr7r.r!rrVrV�s���:�.
���
�
��
�
.�-��
�
��
�
.�-��
�
��
�
-�,��
�
��
�
���
�
��
�
���
�
��
�
���
�
��
�
���
�
��
0�
���
�
�
�
'�
'�(�
&*�
�����
�
'�
'�(�
'*�
�����
�
'�
'�(�
'*�
�����
�
'�
'�(�
*�
�����
�
'�
'�(�
*�
�����
�
'�
'�(�
*�
�����
�
.�
.�/�
1�}F
�r!rVc
���\rSrSr0SS\R
/SSSSSS4_SS/SSSSS	S4_S
S/SSSSS	S4_S
S/SSSSS	S4_SS/SSSSSS4_SS/SSSSSS4_SS\R/SSSS S!S4_S"S#\R
/S$-S%SS%S&S!S4_S'S(/S(SS(S)S!S4_S*S+\R
/S,-S-SS-S.S!S4_S/S0\R
/S1-S2SS2S3S!S4_S4S5\R/S6SS6S7S!S4_S8S9/S:S;S<S=S!S4_S>S?/S@SAS<S=S!S4_SBSC\R
\R
/S:S;S<S=S!S4_SDSE\R/SFSGSS S!S4_SHSI\R
\R/SJSKSS S!S4_rSLrSMr	SNr
SOrSPrSQr
SRrSSrSTrSUrSVrSWrSXrSYrg)Z�TestAddressHeaderiB�empty�<>r�N�address_onlyzzippy@pinhead.com�zippyzpinhead.com�name_and_addressz%Zaphrod Beblebrux <zippy@pinhead.com>zZaphrod Beblebrux�quoted_local_partz)Zaphrod Beblebrux <"foo bar"@pinhead.com>z"foo bar"@pinhead.com�foo bar�quoted_parens_in_namez'"A \(Special\) Person" <person@dom.ain>z%"A (Special) Person" <person@dom.ain>zA (Special) Personzperson@dom.ain�personzdom.ain�quoted_backslashes_in_namez."Arthur \\Backslash\\ Foobar" <person@dom.ain>zArthur \Backslash\ Foobar�
name_with_dotzJohn X. Doe <jxd@example.com>z"John X. Doe" <jxd@example.com>zJohn X. Doezjxd@example.com�jxd�example.com�quoted_strings_in_local_partz""example" example"@example.comr�z"example example"@example.comzexample example�$escaped_quoted_strings_in_local_partz!"\"example\" example"@example.comz"example" example�escaped_escapes_in_local_partz#"\\"example\\" example"@example.comriz#"\\example\\\\ example"@example.comz\example\\ example�'spaces_in_unquoted_local_part_collapsedzmerwok  wok  @example.comr�z"merwok wok"@example.comz
merwok wok�(spaces_around_dots_in_local_part_removedzmerwok. wok .  wok@example.comzmerwok.wok.wok@example.comzmerwok.wok.wok�rfc2047_atom_is_decodedz'=?utf-8?q?=C3=89ric?= <foo@example.com>uÉric <foo@example.com>r��foo@example.comrr�!rfc2047_atom_in_phrase_is_decodedz6The =?utf-8?q?=C3=89ric=2C?= Himself <foo@example.com>u&"The Éric, Himself" <foo@example.com>r��(rfc2047_atom_in_quoted_string_is_decodedz)"=?utf-8?q?=C3=89ric?=" <foo@example.com>�"name_ending_with_dot_without_spacezJohn X.<jxd@example.com>z"John X." <jxd@example.com>zJohn X.�name_starting_with_dotz. Doe <jxd@example.com>z". Doe" <jxd@example.com>z. Doec	��URSU5n	URX�5 URU	RU5 U	Rn
UR[U
5U5 UR[
U	R5S5 URU
/[U	RSR55 URU
/[U	R55 URU
RU5 URU
RU5 URU
RU5 URU
RU5 g)N�senderr�r)r[rdr�r�addressrcr��groups�list�	addresses�display_name�	addr_spec�username�domain)rr�rr�r�r�r�r��commentr�as           r�example_as_address�$TestAddressHeader.example_as_address�s������X�v�.������$�����	�	�7�3�
�I�I������Q���)�����Q�X�X���*����!��d�1�8�8�A�;�#8�#8�9�:����!��d�1�;�;�/�0��������6�������i�0�������X�.�������6�*r!c	��SRU5nU(aSRU5OSn	URSU5n
URX�5 URU
RU5 URU
R
SRU
R5 UR[U
R
5S5 UR[U
R5S5 U
RSnUR[U5U5 URURU5 URURU5 URURU5 URURU5 g)Nzfoo: {};�foo:;�torr�)
�formatr[rdr�rr�r�r�rcr�r�r�r�)rr�rr�r�r�r�r�r��gdecodedrr�s            r�example_as_group�"TestAddressHeader.example_as_group	s���"�"�6�*��18�:�$�$�W�-�g�����T�6�*������%�����	�	�7�3�������!��.�.����<�����Q�X�X���*�����Q�[�[�)�1�-�
�K�K��N������Q���)��������6�������i�0�������X�.�������6�*r!c��SnURSU5nURX!5 UR[UR5S5 UR[UR5S5 [S5H<nURURURSURU5 M> UR[
URS5S5 UR[
URS5S5 UR[
URS5S	5 URURSRS
5 g)NzTFred <dinsdale@python.org>, foo@example.com, "Harry W. Hastings" <hasty@example.com>r�r�rzFred <dinsdale@python.org>r�r~r�z'"Harry W. Hastings" <hasty@example.com>zHarry W. Hastings)r[rdr�r�r��rangercr�)rrZr�is    r�test_simple_address_list�*TestAddressHeader.test_simple_address_lists��>�����T�5�)������"�����Q�X�X���*�����Q�[�[�)�1�-��q��A����Q�X�X�a�[�2�2�1�5�q�{�{�1�~�F������Q�[�[��^�,�.J�K�����Q�[�[��^�,�.?�@�����Q�[�[��^�,�5�	7�������Q��4�4��	!r!c���[URR55nSSRUSSVs/sHo"SPM	 sn5-S-S-SRUSSVs/sHo"SPM	 sn5-S-SRUSSVs/sHo"SPM	 sn5-nSSRUSSVs/sHo"S	PM	 sn5-S-S-SRUSSVs/sHo"S	PM	 sn5-S
-SRUSSVs/sHo"S	PM	 sn5-nUR	SU5nURUR
S5UR
S55 URXT5 UR[UR5S
[U5-S-
5 URURSRS5 URURSRS5 URURSRS5 UR[UR5[U55 [S5HknURURUS	-R5 UR[URUS	-RS5XS	5 Mm [S
S
[U5-S-
5HhnURURUR5 UR[URURS5XS-
S	5 Mj [[U55H^nUR[URU5XS	5 URURURXS5 M` gs snfs snfs snfs snfs snfs snf)Nz dummy list:;, another: (empty);,z, �rz"A \"list\"": �z;,zdummy list:;, another:;, r�z;, r��,rjz
dummy listr��anotherzA "list")r��example_params�values�joinr[rd�splitr�r�r�r�r�r�rcr�)r�examples�xr��expectedrr�s       r�test_complex_address_list�+TestAddressHeader.test_complex_address_list*s}����+�+�2�2�4�5��4����(�2�A�,�7�,�Q�a�D�,�7�8�9�;?�@�"�#��I�I�X�a��]�;�]���t�]�;�<�=�@D�D����(�1�2�,�7�,�Q�a�D�,�7�8�	9��0����(�2�A�,�7�,�Q�a�D�,�7�8�9�;?�@�"�#��I�I�X�a��]�;�]���t�]�;�<�=�@E�E����(�1�2�,�7�,�Q�a�D�,�7�8�	9��
���T�6�*����������x�~�~�c�':�;�����%�����Q�X�X���C��M�(9�A�(=�>�������!��1�1�<�@�������!��1�1�9�=�������!��1�1�:�>�����Q�[�[�)�3�x�=�9��q��A����a�h�h�q��s�m�8�8�9����S����!�A�#��!8�!8��!;�<�h�k�!�n�M���q�!�c�(�m�+�a�/�0�A����a�h�h�q�k�6�6�7����S����!��!6�!6�q�!9�:�H�q�S�M�!�<L�M�1��s�8�}�%�A����S����Q��0�(�+�a�.�A����Q�[�[��^�5�5�x�{�1�~�F�&��98��;��7��
8��;��7s#�O
�%O
�O
�:O!
�(O&
�O+
c��URSS5nUR[5 SUlSSS5 g!,(df   g=f�Nr�zabc@xyz.comrr)r[rsrtr�res  r�test_address_read_only�(TestAddressHeader.test_address_read_onlyMs5�����X�}�5��
�
�
�~�
.��A�I�/�
.�
.��	�9�
Ac��URSS5nUR[5 SUlSSS5 g!,(df   g=fr�)r[rsrtr�res  r�test_addresses_read_only�*TestAddressHeader.test_addresses_read_onlyRs5�����X�}�5��
�
�
�~�
.��A�K�/�
.�
.�r�c��URSS5nUR[5 SUlSSS5 g!,(df   g=fr�)r[rsrtr�res  r�test_groups_read_only�'TestAddressHeader.test_groups_read_onlyWs5�����X�}�5��
�
�
�~�
.��A�H�/�
.�
.�r�c��SnURSU5nURUR[5 URURS[5 g�Nzme <who@example.com>r�r)r[rr�r�r
�rr�rs   r�test_addresses_types�&TestAddressHeader.test_addresses_types\sE��'�����T�6�*�����a�k�k�5�1����a�k�k�!�n�g�6r!c��SnURSU5nURUR[5 URURS[5 gr�)r[rr�r�rr�s   r�test_groups_types�#TestAddressHeader.test_groups_typesbsE��'�����T�6�*�����a�h�h��.����a�h�h�q�k�5�1r!c�b�URS[SSS55nURUS5 g)Nr��merrrwzme <foo@example.com>�r[r
rdres  r�test_set_from_Address�'TestAddressHeader.test_set_from_Addresshs.�����T�7�4��
�#F�G������2�3r!c	�|�URS[SSS5[SSS5/5nURUS5 g)Nr�r�rrrw�yourz+me <foo@example.com>, you <bar@example.com>r�res  r�test_set_from_Address_list�,TestAddressHeader.test_set_from_Address_listlsC�����T�G�D�%��$G�$+�E�5�-�$H�$J�
K������I�Jr!c
�6�URS[SSS5[S[SSS5[S	S
S5/5[SS
S5/5nURUS5 URUR	[
RRSS9S9S5 g)Nr�r�rrrw�bing�fiz�z�b.com�zif�f�c.comr�rzPme <foo@example.com>, bing: fiz <z@b.com>, zif <f@c.com>;, you <bar@example.com>�(��max_line_lengthrzWto: me <foo@example.com>,
 bing: fiz <z@b.com>, zif <f@c.com>;,
 you <bar@example.com>
)r[r
rrdr�rr��cloneres  r�$test_set_from_Address_and_Group_list�6TestAddressHeader.test_set_from_Address_and_Group_listqs������T�G�D�%��$G�$)�&�7�5�#�w�3O�3:�5�#�w�3O�3Q�%R�$+�E�5�-�$H�$J�
K��	
����D�	E�������v�~�~�';�';�B�';�'O��P�3�	4r!c��URS[S[SSS5[SSS5/5/5nURUS	5 g)
Nr�r�r�r�r�r�r�r�z#bing: fiz <z@b.com>, zif <f@c.com>;)r[rr
rdres  r�test_set_from_Group_list�*TestAddressHeader.test_set_from_Group_list}sS�����T�E�&�7�5�#�w�3O�3:�5�#�w�3O�3Q�%R�$S�
T������A�Br!r.)r3r4r5r6rr4�ObsoleteHeaderDefectr�r�r�r�r�r�r�r�r�r�r�r�r�r�r7r.r!rrjrjBs���m
��
��(�(�
)�
�
�
�
�
�
�
�m
�	�
 �
�
 �
�
 �
�
�
�
�m
�,	�
4�
�
4�
 �
 �
�
�
�
�/m
�@	�
8�
�
8�
 �
$�
�
�
�
�Cm
�T	 �
7�
�
4�
!�
�
�
�
�
�Wm
�h	%�
>�
�
>�
)�
�
�
�
�
�km
�|	�
,��)�)�
*�
.�
�
�
�
�
�
�m
�P	'�
.��(�(�
)�!�
+�
,�
�
,�
�
�
�
�Sm
�d	/�
1�
�
1�
�
1�
!�
��
�gm
�x	(�
3��(�(�
)�!�
+�
3�
�
3�
"�
��
�{m
�L	2�
(��(�(�
)�!�
+�
'�
�
'�
�
�
�
�Om
�`	3�
-��)�)�
*�
)�
�
)�
�
�
�
�cm
�t	"�
6��%������
�wm
�H	,�
E��4� �����
�Km
�\	3�
8�
�
'�
'��&�&�
(�%������
�_m
�r	-�
'��)�)�
*�
*�
�
�
�
�
�
�um
�F	!�
&��(�(�&�*E�*E�
F�
(�
�
�
�
�
�
�Im
�N�f
+�"+�"!� !G�F�
 �
�
7�2�4�K�

4�Cr!rjc���\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&g%)&�TestAddressAndGroupi�c�z�UR[5 [XS5 SSS5 g!,(df   g=f)Nrr)rsrtru)r�objrvs   rrw�!TestAddressAndGroup._test_attr_ro�s&��
�
�
�~�
.��C�u�%�/�
.�
.���
,�
:c�>�UR[SSS5S5 g)Nrrrr	r��rwr
r{s r�test_address_display_name_ro�0TestAddressAndGroup.test_address_display_name_ro�s�����7�5�%��7��Hr!c�>�UR[SSS5S5 g)Nrrrr	r�r�r{s r�test_address_username_ro�,TestAddressAndGroup.test_address_username_ro�s�����7�5�%��7��Dr!c�>�UR[SSS5S5 g)Nrrrr	r�r�r{s r�test_address_domain_ro�*TestAddressAndGroup.test_address_domain_ro�s�����7�5�%��7��Br!c�:�UR[S5S5 g)Nrrr��rwrr{s r�test_group_display_name_ro�.TestAddressAndGroup.test_group_display_name_ro�s�����5��<��8r!c�:�UR[S5S5 g)Nrrr�r�r{s r�test_group_addresses_ro�+TestAddressAndGroup.test_group_addresses_ro�s�����5��<��5r!c�4�[SSS5nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nrrrr	�bar@baz�
foo <bar@baz>�r
rdr�r�r�r�rc�rr�s  r�!test_address_from_username_domain�5TestAddressAndGroup.test_address_from_username_domain�st���E�5�%�(���������/�������U�+�������5�)�������i�0�����Q���1r!c�.�[SSS9nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nrrr��r�rr	r�r�r�s  r�test_address_from_addr_spec�/TestAddressAndGroup.test_address_from_addr_spec�sr���E�Y�/���������/�������U�+�������5�)�������i�0�����Q���1r!c�,�[SS9nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nr�r�r�rr	r�r�s  r�!test_address_with_no_display_name�5TestAddressAndGroup.test_address_with_no_display_name�sp���i�(���������,�������U�+�������5�)�������i�0�����Q���+r!c�.�[5nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nr�rlr�r�s  r�test_null_address�%TestAddressAndGroup.test_null_address�sm���I���������,�������R�(�������2�&�������d�+�����Q���&r!c�,�[SS9nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)N�buzz�r�r�z@buzzr�r�s  r�test_domain_only�$TestAddressAndGroup.test_domain_only�sp���6�"���������,�������R�(�������6�*�������g�.�����Q���)r!c�,�[SS9nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nr�r�r�r�r�s  r�test_username_only�&TestAddressAndGroup.test_username_only�sp���V�$���������,�������V�,�������2�&�������f�-�����Q���(r!c�0�[S5nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nrr�rlzbuzz <>r�r�s  r�test_display_name_only�*TestAddressAndGroup.test_display_name_only�so���F�O���������0�������R�(�������2�&�������d�+�����Q���+r!c�4�[SSS5nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)NzSara J.zbad namerwz"bad name"@example.comz""Sara J." <"bad name"@example.com>r�r�s  r�test_quoting� TestAddressAndGroup.test_quoting�sx��
�I�z�=�9���������3�������Z�0�������=�1�������&>�?�����Q��!E�Fr!c�4�[SSS5nURURS5 URURS5 URURS5 URUR
S5 UR[
U5S5 g)Nr��wokuexàmple.comuwok@exàmple.comuÉric <wok@exàmple.com>r�r�s  r�	test_il8n�TestAddressAndGroup.test_il8n�sv���G�U�N�3���������1�������U�+�������>�2�������&8�9�����Q��!;�<r!c��[SS9[SS9[SS9[SS9[SS9[SS9[S	S
9[SS
9[SS
9[S
S9[SS9[SS94nUHEnURUS9 UR[S5 [	S0UD6 SSS5 SSS5 MG g!,(df   N=f!,(df   Mj=f)Nzfoo
)r�zfoo
zfoo
zexample.com
rzexample.com
z
example.com
zwok
rzwok
zwok
zwok@example.com
r�zwok@example.com
zwok@example.com
)�kwargszinvalid argumentsr.)�dict�subTest�assertRaisesRegex�
ValueErrorr
)r�casesrs   r�$test_crlf_in_constructor_args_raises�8TestAddressAndGroup.test_crlf_in_constructor_args_raises�s����g�&��g�&��i�(���(���(��)�*��'�"��'�"��)�$��.�/��.�/��0�1�

���F����V��,�d�.D�.D�Z�Qd�.e��!�&�!�/f�,�,��.e�.e��,�,�s$�7C�B/�C�/
B=�9C�
C	c�v�UR[5 [SSS9 SSS5 g!,(df   g=f)Nrruwők@example.comr��rsrr
r{s r�+test_non_ascii_username_in_addr_spec_raises�?TestAddressAndGroup.test_non_ascii_username_in_addr_spec_raises�s'��
�
�
�z�
*��E�%7�8�+�
*�
*���*�
8c�x�UR[5 [SSSS9 SSS5 g!,(df   g=f)Nrrr�r�)r�r��rsr�r
r{s r�*test_address_addr_spec_and_username_raises�>TestAddressAndGroup.test_address_addr_spec_and_username_raisess(��
�
�
�y�
)��E�F�i�@�*�
)�
)���+�
9c�x�UR[5 [SSSS9 SSS5 g!,(df   g=f)Nrrr�r�)r�r�r#r{s r�(test_address_addr_spec_and_domain_raises�<TestAddressAndGroup.test_address_addr_spec_and_domain_raisess(��
�
�
�y�
)��E�&�I�>�*�
)�
)�r&c�z�UR[5 [SSSSS9 SSS5 g!,(df   g=f)Nrr�bongr�r�)r�r�r�r#r{s r�5test_address_addr_spec_and_username_and_domain_raises�ITestAddressAndGroup.test_address_addr_spec_and_username_and_domain_raisess*��
�
�
�y�
)��E�F�6�Y�O�*�
)�
)�r�c�v�UR[5 [SSS9 SSS5 g!,(df   g=f)Nrrzbad name@example.comr�rr{s r�'test_space_in_addr_spec_username_raises�;TestAddressAndGroup.test_space_in_addr_spec_username_raisess'��
�
�
�z�
*��E�%;�<�+�
*�
*�r!c�v�UR[5 [SSS9 SSS5 g!,(df   g=f)Nrrzname@ex[]ample.comr�rr{s r�test_bad_addr_sepc_raises�-TestAddressAndGroup.test_bad_addr_sepc_raisess'��
�
�
�z�
*��E�%9�:�+�
*�
*�r!c���[S5nURURS5 URUR[	55 UR[U5S5 g)Nrrr��rrdr�r�r�rc�r�gs  r�test_empty_group�$TestAddressAndGroup.test_empty_groupsI���%�L���������/�������e�g�.�����Q���)r!c���[S/S9nURURS5 URUR[	55 UR[U5S5 g)Nrr�r�r�r5r6s  r�test_empty_group_list�)TestAddressAndGroup.test_empty_group_listsL���%�2�&���������/�������e�g�.�����Q���)r!c���[5nURUR5 URUR[55 UR[
U5S5 g)NzNone:;)rr�r�rdr�r�rcr6s  r�test_null_group�#TestAddressAndGroup.test_null_group sE���G�����!�.�.�)�������e�g�.�����Q���*r!c��[SSS5[SSS5/n[SU5nURURS5 URUR[U55 UR[
U5S5 g)N�b�cr�rrzfoo: b <b@c>, a <b@c>;)r
rrdr�r�r�rc�r�addrsr7s   r�test_group_with_addresses�-TestAddressAndGroup.test_group_with_addresses&sk����c�3�'���c�#�)>�?���%�����������/�������e�E�l�3�����Q��!9�:r!c��[SSS5[SSS5/n[US9nURUR5 UR	UR
[
U55 UR	[U5S5 g)NrBrCr�r;zNone: b <b@c>, a <b@c>;�r
rr�r�rdr�r�rcrDs   r�)test_group_with_addresses_no_display_name�=TestAddressAndGroup.test_group_with_addresses_no_display_name-sg����c�3�'���c�#�)>�?���E�"�����!�.�.�)�������e�E�l�3�����Q��!:�;r!c���[SSS5/n[US9nURUR5 UR	UR
[
U55 UR	[U5S5 g)NrBrCr;zb <b@c>rIrDs   r�+test_group_with_one_address_no_display_name�?TestAddressAndGroup.test_group_with_one_address_no_display_name4s[����c�3�'�(���E�"�����!�.�.�)�������e�E�l�3�����Q���+r!c���[S5nURURS5 URUR[	55 UR[U5S5 g)Nzfoo.barz"foo.bar":;r5r6s  r�test_display_name_quoting�-TestAddressAndGroup.test_display_name_quoting;sJ���)����������3�������e�g�.�����Q���/r!c���[S5nURURS5 URUR[	55 UR[U5S5 g)Nrq�	foo bar:;r5r6s  r�#test_display_name_blanks_not_quoted�7TestAddressAndGroup.test_display_name_blanks_not_quotedAsJ���)����������3�������e�g�.�����Q���-r!c��[SSS5n[[RS9nXS'UR	USS5 UR	USR
U45 g)Nrrrrwr�Tor�zfoo <bar@example.com>)r
rrr�rdr�)rr�r�s   r�$test_set_message_header_from_address�8TestAddressAndGroup.test_set_message_header_from_addressGsV���E�5�-�0���6�>�>�*���$������4��"9�:�����4��*�*�Q�D�1r!c���[S5n[[RS9nXS'UR	USS5 UR	USR
UR
5 g)NrqrrWr�rS)rrrr�rdr�)rr7r�s   r�"test_set_message_header_from_group�6TestAddressAndGroup.test_set_message_header_from_groupNsS���)����6�>�>�*���$������4��+�.�����4��*�*�A�K�K�8r!c�n�[SSS5nUR[SSS5U5 UR[SSS5U5 UR[SSS5U5 UR[SSS5U5 URU[	5:H5 URU[:H5 g)Nrrrrwr	)r
rd�assertNotEqual�assertFalse�object�
assertTruer
r�s  r�test_address_comparison�+TestAddressAndGroup.test_address_comparisonUs����E�5�-�0��������}�=�q�A����G�E�5�-�@�!�D����G�E�5�-�@�!�D����G�E�5�%�8�!�<�����f�h��'�����Y��'r!c�L�[SSS5n[SU/5nUR[SU45U5 UR[SU/5U5 UR[S/5U5 UR	U[5:H5 UR
U[:H5 g)Nrrrrwrqr	)r
rrdr^r_r`rar
)rr�r7s   r�test_group_comparison�)TestAddressAndGroup.test_group_comparison^s����E�5�-�0���)�a�S�!������y�1�$�/��3����E�%�!��-�q�1����E�)�R�0�!�4�����f�h��'�����Y��'r!r.N)'r3r4r5r6rwr�r�r�r�r�r�r�r�r�rrrrrrrr$r(r,r/r2r8r<r?rFrJrMrPrTrXr[rbrer7r.r!rr�r��s���&�I�E�C�9�6�2�2�,�'�*�)�,�G�=�"�&9�A�?�P�=�;�*�*�+�;�<�,�0�.�2�9�(�(r!r�c�n�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrg)�TestFoldingihc	��SHOupURS[USS95nURUR[R
S9SU-5 MQ g)N)	)zFoo Bar, Francez"Foo Bar, France")zFoo Bar (France)z"Foo Bar (France)")uFoo Bar, Españaz"Foo =?utf-8?q?Bar=2C_Espa=C3=B1a?=)uFoo Bar (España)z Foo Bar =?utf-8?b?KEVzcGHDsWEp?=)uFoo, Bar Españaz"=?utf-8?q?Foo=2C_Bar_Espa=C3=B1a?=)uFoo, Bar [España]z(=?utf-8?q?Foo=2C_Bar_=5BEspa=C3=B1a=5D?=)uFoo Bär, Francez"Foo =?utf-8?q?B=C3=A4r=2C?= France)uFoo Bär <France>z%Foo =?utf-8?q?B=C3=A4r_=3CFrance=3E?=)urLôrem ipsum dôlôr sit amet, cônsectetuer adipiscing. Suspendisse pôtenti. Aliquam nibh. Suspendisse pôtenti.z�=?utf-8?q?L=C3=B4rem_ipsum_d=C3=B4l=C3=B4r_sit_amet=2C_c=C3=B4nsectetuer?=
 =?utf-8?q?_adipiscing=2E_Suspendisse_p=C3=B4tenti=2E_Aliquam_nibh=2E?=
 Suspendisse =?utf-8?q?p=C3=B4tenti=2E?=rWza@b.comr�rzTo: %s <a@b.com>
)r[r
rdr�rr�)rrY�resultrs    r�test_address_display_names�&TestFolding.test_address_display_namesjsS���L�D�$� � ��w�t�y�'I�J�A����Q�V�V�6�>�>�V�:�$8�6�$A�
C�'r!c��URSS5nURUR[RS9S5 g)NrHrbrzsubject: this is a test
�r[rdr�rr�res  r�test_short_unstructured�#TestFolding.test_short_unstructured�s7�����Y�(8�9��������v�~�~��6�4�	6r!c��URSS5nURUR[RS9S5 g)Nr#zhThis is a long header line that will need to be folded into two lines and will demonstrate basic foldingrzsSubject: This is a long header line that will need to be folded into two lines
 and will demonstrate basic folding
rnres  r�test_long_unstructured�"TestFolding.test_long_unstructured�sA�����Y�)1�
2��	
������v�~�~��6�@�	Ar!c���URSS5nURUR[RRSS9S9[R"S55 g)Nr#z1this is a short header that will be folded anywayr�r�rz�                Subject: this is a
                 short header that
                 will be folded
                 anyway
                �r[rdr�rr�r��textwrap�dedentres  r�'test_unstructured_short_max_line_length�3TestFolding.test_unstructured_short_max_line_length�sX�����Y�))�
*�����
�F�F�&�.�.�.�.�r�.�B�F�C��O�O��
�	r!c��URSS5nURUR[RS9S5 g)Nr#rrzSubject: test
rnres  r�"test_fold_unstructured_single_word�.TestFolding.test_fold_unstructured_single_word�s4�����Y��/��������v�~�~��6�8I�Jr!c��URSS5nURUR[RS9S5 g)Nr#ztest test testrzSubject: test test test
rnres  r�test_fold_unstructured_short�(TestFolding.test_fold_unstructured_short�s7�����Y�(8�9��������v�~�~��6�3�	5r!c��URSS5nURUR[RRSS9S9S5 g)Nr#�5thisisaverylonglineconsistingofasinglewordthatwontfitr�r�rz�Subject:
 =?utf-8?q?thisisa?=
 =?utf-8?q?verylon?=
 =?utf-8?q?glineco?=
 =?utf-8?q?nsistin?=
 =?utf-8?q?gofasin?=
 =?utf-8?q?gleword?=
 =?utf-8?q?thatwon?=
 =?utf-8?q?tfit?=
�r[rdr�rr�r�res  r�)test_fold_unstructured_with_overlong_word�5TestFolding.test_fold_unstructured_with_overlong_word�sL�����Y�)$�
%�����
�F�F�&�.�.�.�.�r�.�B�F�C�
"�	r!c��URSS5nURUR[RRSS9S9S5 g)Nr#zXthisisaverylonglineconsistingofasinglewordthatwontfit plusanotherverylongwordthatwontfitr�r�raSubject:
 =?utf-8?q?thisisa?=
 =?utf-8?q?verylon?=
 =?utf-8?q?glineco?=
 =?utf-8?q?nsistin?=
 =?utf-8?q?gofasin?=
 =?utf-8?q?gleword?=
 =?utf-8?q?thatwon?=
 =?utf-8?q?tfit_pl?=
 =?utf-8?q?usanoth?=
 =?utf-8?q?erveryl?=
 =?utf-8?q?ongword?=
 =?utf-8?q?thatwon?=
 =?utf-8?q?tfit?=
r�res  r�.test_fold_unstructured_with_two_overlong_words�:TestFolding.test_fold_unstructured_with_two_overlong_words�sN�����Y�)G�
H�����
�F�F�&�.�.�.�.�r�.�B�F�C�

"�	r!c��URSS5nURUR[RRSS9S9S5 g)Nr#� thislongwordislessthanmaxlinelen�#r�rz+Subject:
 thislongwordislessthanmaxlinelen
r�res  r�.test_fold_unstructured_with_slightly_long_word�:TestFolding.test_fold_unstructured_with_slightly_long_word�sF�����Y�(J�K�����
�F�F�&�.�.�.�.�r�.�B�F�C�;�	=r!c���URSS5nURUR[RRSS9S9[R"S55 g)Nr#z�This header is intended to demonstrate, in a fairly succinct way, that we now do not give a , special treatment in unstructured headers.�<r�rz�                Subject: This header is intended to demonstrate, in a fairly
                 succinct way, that we now do not give a , special treatment
                 in unstructured headers.
                 rures  r�"test_fold_unstructured_with_commas�.TestFolding.test_fold_unstructured_with_commas�s\�����Y�)F�
G��	
���
�F�F�&�.�.�.�.�r�.�B�F�C��O�O��
�	r!c��URSS5nURUR[RS9[
R"S55 g)NrWz�"Theodore H. Perfect" <yes@man.com>, "My address is very long because my name is long" <foo@bar.com>, "Only A. Friend" <no@yes.com>rz�            To: "Theodore H. Perfect" <yes@man.com>,
             "My address is very long because my name is long" <foo@bar.com>,
             "Only A. Friend" <no@yes.com>
             )r[rdr�rr�rvrwres  r�test_fold_address_list�"TestFolding.test_fold_address_list�sK�����T�$,�
-��	
������v�~�~��6����I�9�	r!c��URSS5nURUR[RS9S5 g)Nr�zSat, 2 Feb 2002 17:00:06 -0800rz&Date: Sat, 02 Feb 2002 17:00:06 -0800
rnres  r�test_fold_date_header�!TestFolding.test_fold_date_header�s8�����V�%E�F��������v�~�~��6�A�	Cr!c��URSS5nURUR[RS9S5 g)NzX-Report-Abusez]<https://www.mailitapp.com/report_abuse.php?mid=xxx-xxx-xxxxxxxxxxxxxxxxxxxxxxxx==-xxx-xx-xx>rz�X-Report-Abuse: =?utf-8?q?=3Chttps=3A//www=2Emailitapp=2Ecom/report=5Fabuse?=
 =?utf-8?q?=2Ephp=3Fmid=3Dxxx-xxx-xxxxxxxxxxxxxxxxxxxxxxxx=3D=3D-xxx-xx-xx?=
 =?utf-8?q?=3E?=
rnres  r�&test_fold_overlong_words_using_RFC2047�2TestFolding.test_fold_overlong_words_using_RFC2047�sC������
B�
C��	
���
�F�F�&�.�.�F�)�
!�	"r!c�d�URSS5nURUR[RRSS9S9S5 URSS5nURUR[RRSS9S9S5 URSS	5nURUR[RRS
S9S9S5 URSS5nURUR[RRSS9S9S
5 g)Nz
Message-IDz+<somemessageidlongerthan@maxlinelength.com>r�r�rz8Message-ID: <somemessageidlongerthan@maxlinelength.com>
z1<somemessageidlongerthan@[127.0.0.0.0.0.0.0.0.1]>z>Message-ID: <somemessageidlongerthan@[127.0.0.0.0.0.0.0.0.1]>
u<ईमेल@wők.com>�u$Message-ID: <ईमेल@wők.com>
u"<ईमेलfromMessage@wők.com>u0Message-ID:
 <ईमेलfromMessage@wők.com>
r�res  r�$test_message_id_header_is_not_folded�0TestFolding.test_message_id_header_is_not_folded�s&������9�
;��	
���
�F�F�&�.�.�.�.�r�.�B�F�C�G�	I�

����?�
A��	
���
�F�F�&�.�.�.�.�r�.�B�F�C�M�	O�

���\�+D�E�����
�F�F�&�.�.�.�.�r�.�B�F�C�3�	5�
���\�+O�P�����
�F�F�&�.�.�.�.�r�.�B�F�C�@�	Br!c��URSS5nURUR[RRSS9S9S5 g)N�
Referencesza<referenceid1thatislongerthan@maxlinelength.com> <referenceid2thatislongerthan@maxlinelength.com>r�r�rzoReferences: <referenceid1thatislongerthan@maxlinelength.com>
 <referenceid2thatislongerthan@maxlinelength.com>
r�res  r�test_fold_references� TestFolding.test_fold_referencessQ������
?�
��
	
���
�F�F�&�.�.�.�.�r�.�B�F�C�
B�	Cr!r.N)r3r4r5r6rkrorrrxr{r~r�r�r�r�r�r�r�r�r�r7r.r!rrhrhhsS��C�06�
A�
�K�5�
� �.=���C�
"�B�:
Cr!rh�__main__)#r�rv�unittest�emailrr�
email.messager�test.test_emailrrr	�email.headerregistryr
r�email.headerr�test.supportr
r`r�rrVr^r�r�r�r:rGrVrjr�rhr3�mainr.r!r�<module>r�sb�������!�7� �/�&�"�	���7K��7K�t)�]�)�"0�^�"0�\�%�^�%��%�P�>6�^�>6��>6�B�t�N�t��t�n�)�.�)��)�X�O�^�O��O�d�Z
�N�Z
��Z
�z�}C��}C��}C�@
b(�-�b(�JzC�.�zC�z�z���M�M�O�r!

Youez - 2016 - github.com/yon3zu
LinuXploit