HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/test_email/__pycache__/test_headerregistry.cpython-310.pyc
o

�i��@snddlZddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
ddlmZddlm
Z
mZddlmZe�ZGd	d
�d
e	�ZGdd�de	�ZGd
d�de�Ze
Gdd�de��Ze
Gdd�de��Ze
Gdd�de��Ze
Gdd�de��Ze
Gdd�de��Ze
Gdd�de��Ze
Gdd�de��ZGdd�de	�ZGdd �d e�Zed!kr�e� �dSdS)"�N)�errors��policy)�Message)�
TestEmailBase�parameterize)�headerregistry)�Address�Group)�	ALWAYS_EQc@s`eZdZdd�Zdd�ZGdd�d�Zdd�ZGd	d
�d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�TestHeaderRegistrycCs2t��}|dd�}|�|tj�|�|tj�dS�N�foobar�test�r�HeaderRegistry�assertIsInstance�
BaseHeader�UnstructuredHeader��self�factory�h�r�@/usr/local/lib/python3.10/test/test_email/test_headerregistry.py� test_arbitrary_name_unstructureds
z3TestHeaderRegistry.test_arbitrary_name_unstructuredcCs@t��}|�d|j�|dd�}|�|tj�|�|tj�dS)N�Subjectr)rrZassertNotIn�registryrr�UniqueUnstructuredHeaderrrrr�test_name_case_ignoreds

z)TestHeaderRegistry.test_name_case_ignoredc@seZdZdd�ZdS)zTestHeaderRegistry.FooBasecOsdS�Nr)r�args�kwrrr�__init__!sz#TestHeaderRegistry.FooBase.__init__N)�__name__�
__module__�__qualname__r#rrrr�FooBase �r'cCs8tj|jd�}|dd�}|�||j�|�|tj�dS)N)Z
base_classrr)rrr'rrrrrr� test_override_default_base_class$�
z3TestHeaderRegistry.test_override_default_base_classc@seZdZejjZdS)zTestHeaderRegistry.FooDefaultN)r$r%r&rr�parserrrr�
FooDefault*r(r,cCs8tj|jd�}|dd�}|�|tj�|�||j�dS)N�Z
default_classrr)rrr,rrrrrr�test_override_default_class-r*z.TestHeaderRegistry.test_override_default_classcCs8tj|jd�}|dd�}|�|tj�|�|tj�dS)Nr-�subjectr)rrr,rrrrrrr�2test_override_default_class_only_overrides_default3r*zETestHeaderRegistry.test_override_default_class_only_overrides_defaultcCs6tjdd�}|dd�}|�|tj�|�|tj�dS)NF)Zuse_default_mapr/rrrrrr�test_dont_use_default_map9s
z,TestHeaderRegistry.test_dont_use_default_mapcCsft��}|dd�}|�dtj�|dd�}|�|tj�|�|tj�|�|tj�|�|tj�dSr
)rrZmap_to_typerrrr)rrZh1Zh2rrr�test_map_to_type?s

z#TestHeaderRegistry.test_map_to_typeN)r$r%r&rrr'r)r,r.r0r1r2rrrrrsrc@seZdZe��Zdd�ZdS)�TestHeaderBasecCs|�||�Sr )r)r�name�valuerrr�make_headerNszTestHeaderBase.make_headerN)r$r%r&rrrr6rrrrr3Jsr3c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TestBaseHeaderFeaturescCs8|�dd�}|�|t�|�|d�|�t|�d�dS�Nr/�this is a test)r6r�str�assertEqual�rrrrr�test_strTszTestBaseHeaderFeatures.test_strcCs$|�dd�}|�|dd�d�dS)Nr/r9���is)r6r;r<rrr�test_substrZsz"TestBaseHeaderFeatures.test_substrcCs|�dd�}|�|jd�dSr8)r6r;r4r<rrr�
test_has_name^sz$TestBaseHeaderFeatures.test_has_namecCsH|�dd�}|�t��t||d�Wd�dS1swYdS)Nr/r9�foo)r6�assertRaises�AttributeError�setattr)r�attrrrrr�
_test_attr_robs"�z$TestBaseHeaderFeatures._test_attr_rocC�|�d�dS)Nr4�rH�rrrr�test_name_read_onlyg�z*TestBaseHeaderFeatures.test_name_read_onlycCrI)N�defectsrJrKrrr�test_defects_read_onlyjrMz-TestBaseHeaderFeatures.test_defects_read_onlycCs\|�dd�}|�t|j�d�|�|jt�|�dd�}|�t|j�d�|�|jt�dS)Nr/r9r�date��)r6r;�lenrNr�tupler<rrr�test_defects_is_tuplemsz,TestBaseHeaderFeatures.test_defects_is_tupleN)
r$r%r&r=rArBrHrLrOrUrrrrr7Rsr7c@s2eZdZdd�Zddgdfddgdfdd	d
�ZdS)�TestUnstructuredHeaderc	Gs�t|�}|dkr|dng}d|rdnd}||dkr|dn|d}|�d|�}|�||�|�|j|�|�|jtjd�|�dS)	NrzSubject:� rQrR�
rr)rSr6r;�assertDefectsEqualrN�foldr�default)	r�source�decodedr!�lrN�header�foldedrrrr�string_as_value�sz&TestUnstructuredHeader.string_as_valuez=?utf-8?q?this_is_a_test?=r9z!=?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)Zrfc2047_simple_quopriZrfc2047_gb2312_base64Zrfc2047_simple_nonascii_quopriZ rfc2047_quopri_with_regular_textN)r$r%r&raZ
string_paramsrrrrrV�s��
�rVc	@s�eZdZdZejdd�Ze�e�Zejdddddd	ed
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�ZdS)�TestDateHeaderzSun, 23 Sep 2001 20:10:55 -0700i����)Zhoursi��	���
�7)ZtzinfocCsR|�d|j�}|�||j�|�|j|j�|�|j��|j�|�|jd�dS�NrPr)r6�
datestringr;�datetime�dt�	utcoffsetrNr<rrr�test_parse_date�s
zTestDateHeader.test_parse_datecCs>|�d|j�}|�||j�|�|j|j�|�|jd�dSrj)r6rmr;rkrlrNr<rrr�test_set_from_datetime�sz%TestDateHeader.test_set_from_datetimecCs<|�d|j�}|�|tj�|�|jd�|�|jd�dS)NrPrRr)r6rkrrZUniqueDateHeaderr;�	max_countrNr<rrr�test_date_header_properties��z*TestDateHeader.test_date_header_propertiescCs<|�d|j�}|�|tj�|�|jd�|�|jd�dS)Nzresent-dater)r6rkrrZ
DateHeaderr;rqrNr<rrr�"test_resent_date_header_properties�rsz1TestDateHeader.test_resent_date_header_propertiescCs6|�dd�}|�t|j�d�|�|jdtj�dS)NrPrQrRr)r6r;rSrNrr�HeaderMissingRequiredValuer<rrr�test_no_value_is_defect�sz&TestDateHeader.test_no_value_is_defectcC�Rd}|�d|�}|�||�|�|j�|�t|j�d�|�|jdtj�dS)NzNot a date headerrPrRr�	r6r;�assertIsNonerlrSrNrrZInvalidDateDefect�r�srrrr�test_invalid_date_format��z'TestDateHeader.test_invalid_date_formatcCrw)NzTue, 06 Jun 2017 27:39:33 +0600rPrRrrxrzrrr�test_invalid_date_value�r}z&TestDateHeader.test_invalid_date_valuecCsD|�d|j�}|�t��d|_Wd�dS1swYdS)NrPrC)r6rkrDrErlr<rrr�test_datetime_read_only�s"�z&TestDateHeader.test_datetime_read_onlycCs@ttjd�}|j|d<|�|d|j�|�|dj|j�dS)Nr�Date)rrr[rmr;rkrl)r�mrrr�"test_set_date_header_from_datetime�s
z1TestDateHeader.test_set_date_header_from_datetimeN)r$r%r&rkrlZ	timedeltarn�timezoneZtzrmrorprrrtrvr|r~rr�rrrrrd�s
rdc@s�eZdZdd�Ziddddddd	igd
f�ddddddd	igd
f�d
d
ddddd	if�dddddiejgf�dddddiejgf�dddddiejgf�dddddiejgf�dd�dd�dd�dd�ddddddd if�d!d"ddddd#if�d$d%ddddd&if�d'd(ddddd igd)f�d*d+dddd,digd-f�d.d/dddd,d0if�id1d2dddd,d3if�d4d5dddd6d6d7�ejgd8f�d9d:d;d<d=d>d?igd@f�dAdBdCdDdEdFdGdHdI�gdJdKf�dLdMdCdDdEdFdGdHdNdO�gdMdPf�dQdRdCdDdEdSdTif�dUdVdCdDdEdSdWif�dXdYdCdDdEdSdZigdYf�d[d\�d]��d	d^�d_d`dadbdcdd�ejgd8dedff�dgdhdCdDdEdSdiigdjf�dkdldCdDdEdadmigdnf�dodp�d]��d	d^�dddd	dqdr�ejgdsdtf�dudvddddd	igd
f�dwdxddddSdyigdzf�d{d|ddddSd}iejgd~df�d�d�dddd	d�dr�ejgd~d�d�f�d�d�d�d�d�dSd�iejgd~d�f��d�d�d�d�dSd�igd�fd�ddddSd�iejgd�fd�ddddSd�iejgd~d�fd�ddddSd�iejgd~d�fd�ddddSd�iejgd�d�fd�ddddSd�igd�fd�ddddd�iejgd�d�fd�ddddd�iejgd�d�fd�ddddd�igd�d�fd�d�d�d�dSd�iejgd�fd�d�d�d�dSd�iejgd8d�fd�d�d�d�dSd�iejgd~d�fd�d�d�d�dSd�igd�d�fd��
�Z	d�S)��TestContentTypeHeaderc
Gs$t|�}|dkr|dni}|dkr|dng}|dkr&|dtur&|dn|}	|r,dnd}
|dkr6|dn|
|	d}|�d|�}|�|j|�|�|j|�|�|j|�|�|j|�|�t	��
d	|jd
<Wd�n1sswY|�
|j|�|�||	�|�|jt
jd�|�dS)NrrR�zContent-Type: rQ�rXzContent-TypeZxyz�abcr)rS�DITTOr6r;�content_type�maintype�subtype�paramsrD�	TypeErrorrYrNrZrr[)
rr\r�r�r�r!r^�parmdictrNr]r_r`rrrr�content_type_as_value�s" �z+TestContentTypeHeader.content_type_as_value�
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_3Zno_subtype_in_content_typeztext/Zno_slash_in_content_typerCZjunk_text_in_content_typez<crazy "stuff">Z too_many_slashes_in_content_typezimage/jpeg/fooZunknown_content_type)�	bad/namesr�Zbad�namesZmixed_case_content_type)z
ImAge/JPeg�
image/jpeg�image�jpegZspaces_in_content_type)z  text  /  plain  r�r�r�Zcfws_in_content_type)z"(foo) text (bar)/(baz)plain(stuff)r�r�r�Z
charset_paramztext/plain; charset="utf-8"zutf-8Zcapitalized_charsetztext/plain; charset="US-ASCII"zUS-ASCIIZunknown_charsetztext/plain; charset="fOo"ZfOoZ*capitalized_charset_param_name_and_commentz*text/plain; (interjection) Charset="utf-8"ztext/plain; Charset="utf-8"Zunquoted_param_valueztext/plain; title=foo�titleztext/plain; title="foo"Zparam_value_with_tspecialsz!text/plain; title="(bar)foo blue"z
(bar)foo blueZ"param_with_extra_quoted_whitespacez0text/plain; title="  a     loong  way 	 home   "z  a     loong  way 	 home   Z
bad_paramszblarg; baz; boorQ)�bazZboor�Zspaces_around_param_equalsz0Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"zmultipart/mixedZ	multipartZmixed�boundaryZCPIMSSMTPC06p5f3tGz.Multipart/mixed; boundary="CPIMSSMTPC06p5f3tG"Zspaces_around_semiszPimage/jpeg; name="wibble.JPG" ; x-mac-type="4A504547" ; x-mac-creator="474B4F4E"r�r�r�z
wibble.JPGZ4A504547Z474B4F4E)r4�
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"
Zlots_of_mime_paramszmimage/jpeg; name="wibble.JPG"; x-mac-type="4A504547"; x-mac-creator="474B4F4E"; x-extrastuff="make it longer"zmake it longer)r4r�r�zx-extrastuffz}Content-Type: image/jpeg; name="wibble.JPG"; x-mac-type="4A504547";
 x-mac-creator="474B4F4E"; x-extrastuff="make it longer"
Zsemis_inside_quotesz$image/jpeg; name="Jim&amp;&amp;Jill"r4zJim&amp;&amp;JillZsingle_quotes_inside_quotesz!image/jpeg; name="Jim 'Bob' Jill"zJim 'Bob' JillZdouble_quotes_inside_quotesz#image/jpeg; name="Jim \"Bob\" Jill"zJim "Bob" JillZnon_ascii_in_paramsufoo§/bar; b§r=two; baz=thr§ezlatin-1�surrogateescapeu
foo�/barufoo��barZtwouthr�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
Zrfc2231_segmented_normal_valuesz(image/jpeg; name*0="abc"; name*1=".html"zabc.htmlzimage/jpeg; name="abc.html"Zquotes_inside_rfc2231_valuez.image/jpeg; bar*0="baz\"foobar"; bar*1="\"baz"zbaz"foobar"bazz"image/jpeg; bar="baz\"foobar\"baz"Znon_ascii_rfc2231_valueuGtext/plain; charset=us-ascii; title*=us-ascii'en'This%20is%20not%20f§nuThis is not f�n)r�r�u9text/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
Zrfc2231_encoded_charsetz-text/plain; charset*=ansi-x3.4-1968''us-asciiZ 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"Z"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"Z)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!"
Z3rfc2231_single_quote_in_value_with_charset_and_langzHapplication/x-foo;	name*0*="us-ascii'en-us'Frank's"; name*1*=" Document"zapplication/x-fooZapplicationzx-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_defaultZascii_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
)
Z)rfc2231_single_quote_in_non_encoded_valueZrfc2231_no_language_or_charsetZrfc2231_encoded_no_charsetZrfc2231_partly_encodedZrfc2231_partly_encoded_2Z(rfc2231_unknown_charset_treated_as_asciiZ0rfc2231_bad_character_in_charset_parameter_valueZ8rfc2231_utf8_in_supposedly_ascii_charset_parameter_valueZ6rfc2231_nonascii_in_charset_of_charset_parameter_valueZ'rfc2231_encoded_then_unencoded_segmentsZ'rfc2231_unencoded_then_encoded_segmentsZ.rfc2231_quoted_unencoded_then_encoded_segmentsZ+rfc2231_folded_segments_correctly_formattedN)
r$r%r&r�r�InvalidHeaderDefect�encode�decodeZUndecodableBytesDefectZcontent_type_paramsrrrrr��s���
���� ��(��0��8��F�N�T�Z�d��k��r��y��
���������"
���*���4����E����Y���`���g���p
�
�����������
�����(����2����@
����M
����]
����i��

�
���
�
��
�
�
�������r�c@s8eZdZdd�Zdddejgddfddejgfd�Zd	S)
�TestContentTransferEncodingc
Gs�t|�}|dkr|dng}|dkr|dtur|dn|}|r"dnd}|dkr,|dn||d}|�d|�}	|�|	j|�|�|	j|�|�|	|�|�|	jtj	d�|�dS)	NrrRzContent-Transfer-Encoding: rQr�rXzContent-Transfer-Encodingr)
rSr�r6r;�cterYrNrZrr[)
rr\r�r!r^rNr]r_r`rrrr�cte_as_value&s z(TestContentTransferEncoding.cte_as_value)�base64r�rQZ7bitzContent-Transfer-Encoding:
z7bit and a bunch more)�
RFC_2183_1�no_valueZjunk_after_cteN)r$r%r&r�rrur�Z
cte_paramsrrrrr�#s�	�
�r�c@s�eZdZdd�Zdddddd�gd	d
fddiejgdd
fddiejgfddddiejgfddddiejgdddfddddiejgddfd�ZdS)�TestContentDispositioncGs�t|�}|dkr|dni}|dkr|dng}|dkr&|dtur&|dn|}|r,dnd}|dkr6|dn||d}	|�d|�}
|�|
j|�|�|
j|�|�|
j|�|�|
|�|�|
jt	j
d	�|	�dS)
NrrRr�zContent-Disposition: rQr�rXzContent-Dispositionr)rSr�r6r;�content_dispositionr�rYrNrZrr[)rr\r�r!r^r�rNr]r_r`rrrr�content_disp_as_valueNs z,TestContentDisposition.content_disp_as_value)�inliner�zWattachment; filename=genome.jpeg;  modification-date="Wed, 12 Feb 1997 16:29:51 -0500";Z
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"
rQNzContent-Disposition:
zab./kzab.zab./k; filename="foo"r�rCzaattachment; 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"
)r�Z
RFC_2183_2r�Z
invalid_valueZinvalid_value_with_paramsZ+invalid_parameter_value_with_fws_between_ewZ'parameter_value_with_fws_between_tokens)r$r%r&r�rrur�Zcontent_disp_paramsrrrrr�KsX���	��
��
�r�c@seZdZdd�Zdddddgfdddddgfdddddgfdddddgfd	d	d	ddgfd
d
d
ddgfdddddgfd
d
dddgfdddddejgfdddddejgfdddddejgfdddddejgfdddddejgfdddddejgfdddddejgfd�ZdS)�TestMIMEVersionHeadercCs~|�d|�}|�||�|�|j|�|�|j|�|�|j|�|�|j|�|r.d|}|�|jtj	d�d|d�dS)NzMIME-VersionrWrz
MIME-Version:rX)
r6r;�version�major�minorrYrNrZrr[)rr\r]r�r�r�rNrrrr�version_string_as_MIME_Version�s
�z4TestMIMEVersionHeader.version_string_as_MIME_Versionz1.0rRrz1.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.xrCrQ)r�r�r�Z
RFC_2045_4Z1_1Z2_1�
whitespaceZ#leading_trailing_whitespace_ignoredZnon_comment_garbage_afterZnon_comment_garbage_beforeZnon_comment_garbage_insideZtwo_periodsZ2_xrC�missing)r$r%r&r�rr�ruZversion_string_paramsrrrrr��s��	�	�	��	�	�	�
�
�	�	�	�	�	�
�r�c@s�eZdZdejgddddddfdgddddddfdgddddddfd	gd	dd
dddfdgd
dddddfdgddddddfdejgddddddfdejgdddddddfdgddddddfd ejgd!d"dd"d#ddfd$ejgd%d&dd&d'ddfd(ejgd)dd)d*ddfd+gd,d-d.d/ddfd0gd1d2d.d/ddfd3ejejgd,d-d.d/ddfd4�Zd5d6�Zd7d8�Zd9d:�Z	d;d<�Z
d=d>�Zd?d@�ZdAdB�Z
dCdD�ZdEdF�ZdGdH�ZdIdJ�ZdKdL�ZdMdN�ZdS)O�TestAddressHeader�<>rQNzzippy@pinhead.comZzippyzpinhead.comz%Zaphrod Beblebrux <zippy@pinhead.com>zZaphrod Beblebruxz)Zaphrod Beblebrux <"foo bar"@pinhead.com>z"foo bar"@pinhead.com�foo barz'"A \(Special\) Person" <person@dom.ain>z%"A (Special) Person" <person@dom.ain>zA (Special) Personzperson@dom.ainZpersonzdom.ainz."Arthur \\Backslash\\ Foobar" <person@dom.ain>zArthur \Backslash\ FoobarzJohn X. Doe <jxd@example.com>z"John X. Doe" <jxd@example.com>zJohn X. Doezjxd@example.comZjxd�example.comz""example" example"@example.comr�z"example example"@example.comzexample examplez!"\"example\" example"@example.comz"example" examplez#"\\"example\\" example"@example.comr>z#"\\example\\\\ example"@example.comz\example\\ examplezmerwok  wok  @example.comr�z"merwok wok"@example.comz
merwok wokzmerwok. wok .  wok@example.comzmerwok.wok.wok@example.comzmerwok.wok.wokz'=?utf-8?q?=C3=89ric?= <foo@example.com>uÉric <foo@example.com>rb�foo@example.comrCz6The =?utf-8?q?=C3=89ric=2C?= Himself <foo@example.com>u&"The Éric, Himself" <foo@example.com>rcz)"=?utf-8?q?=C3=89ric?=" <foo@example.com>)�emptyZaddress_onlyZname_and_addressZquoted_local_partZquoted_parens_in_nameZquoted_backslashes_in_nameZ
name_with_dotZquoted_strings_in_local_partZ$escaped_quoted_strings_in_local_partZescaped_escapes_in_local_partZ'spaces_in_unquoted_local_part_collapsedZ(spaces_around_dots_in_local_part_removedZrfc2047_atom_is_decodedZ!rfc2047_atom_in_phrase_is_decodedZ(rfc2047_atom_in_quoted_string_is_decodedc	Cs�|�d|�}	|�|	|�|�|	j|�|	j}
|�t|
�|�|�t|	j�d�|�|
gt|	jdj	��|�|
gt|	j	��|�|
j
|�|�|
j|�|�|
j|�|�|
j
|�dS)N�senderrRr)r6r;rYrN�addressr:rS�groups�list�	addresses�display_name�	addr_spec�username�domain)rr\rNr]r�r�r�r��commentr�arrr�example_as_address�sz$TestAddressHeader.example_as_addressc	Cs�d�|�}|rd�|�nd}	|�d|�}
|�|
|	�|�|
j|�|�|
jdj|
j�|�t|
j�d�|�t|
j�d�|
jd}|�t|�|�|�|j	|�|�|j
|�|�|j|�|�|j|�dS)Nzfoo: {};�foo:;�torrR)
�formatr6r;rYrNr�r�rSr:r�r�r�r�)rr\rNr]r�r�r�r�r�Zgdecodedrr�rrr�example_as_group�s

z"TestAddressHeader.example_as_groupcCs�d}|�d|�}|�||�|�t|j�d�|�t|j�d�td�D]}|�|j|jd|j|�q$|�t|jd�d�|�t|jd�d�|�t|jd�d	�|�|jdjd
�dS)NzTFred <dinsdale@python.org>, foo@example.com, "Harry W. Hastings" <hasty@example.com>r�r�rzFred <dinsdale@python.org>rRr�r�z'"Harry W. Hastings" <hasty@example.com>zHarry W. Hastings)r6r;rSr�r��ranger:r�)rr5r�irrr�test_simple_address_lists ��z*TestAddressHeader.test_simple_address_listcCsjt|j���}dd�dd�|dd�D��ddd�dd�|dd�D��d	d�d
d�|dd�D��}dd�dd�|dd�D��ddd�d
d�|dd�D��dd�dd�|dd�D��}|�d|�}|�|�d�|�d��|�||�|�t|j�dt|�d�|�|jdj	d�|�|jdj	d�|�|jdj	d�|�t|j
�t|��td�D]!}|�|j|dj	�|�t
|j|dj
d�||d�q�tddt|�d�D]}|�|j|j	�|�t
|j|j
d�||dd�q�tt|��D] }|�t
|j
|�||d�|�|j
|j||d��qdS)Nz dummy list:;, another: (empty);,z, cS�g|]}|d�qS�rr��.0�xrrr�
<listcomp>�z?TestAddressHeader.test_complex_address_list.<locals>.<listcomp>�z"A \"list\"": cSr�r�rr�rrrr�r��z;,cSr�r�rr�rrrr�r�zdummy list:;, another:;, cSr��r�rr�rrrr�r�cSr�r�rr�rrrr�r�z;, cSr�r�rr�rrrr�r�r��,r?rz
dummy listrRZanotherzA "list"r�)r��example_params�values�joinr6r;�splitrSr�r�r�r�ryr:r�)rZexamplesr\Zexpectedrr�rrr�test_complex_address_listsZ������������** �z+TestAddressHeader.test_complex_address_listcC�B|�dd�}|�t��d|_Wd�dS1swYdS�Nr�zabc@xyz.comrC)r6rDrEr�r<rrr�test_address_read_only3�"�z(TestAddressHeader.test_address_read_onlycCr�r�)r6rDrEr�r<rrr�test_addresses_read_only8r�z*TestAddressHeader.test_addresses_read_onlycCr�r�)r6rDrEr�r<rrr�test_groups_read_only=r�z'TestAddressHeader.test_groups_read_onlycC�4d}|�d|�}|�|jt�|�|jdt�dS�Nzme <who@example.com>r�r)r6rr�rTr	�rr\rrrr�test_addresses_typesB�z&TestAddressHeader.test_addresses_typescCr�r�)r6rr�rTr
r�rrr�test_groups_typesHr�z#TestAddressHeader.test_groups_typescCs$|�dtddd��}|�|d�dS)Nr��merCr�zme <foo@example.com>�r6r	r;r<rrr�test_set_from_AddressNsz'TestAddressHeader.test_set_from_AddresscCs0|�dtddd�tddd�g�}|�|d�dS)Nr�r�rCr��your�z+me <foo@example.com>, you <bar@example.com>r�r<rrr�test_set_from_Address_listRs
�z,TestAddressHeader.test_set_from_Address_listcCsj|�dtddd�tdtddd�td	d
d�g�tdd
d�g�}|�|d�|�|jtjjdd�d�d�dS)Nr�r�rCr��bing�fiz�z�b.com�zif�f�c.comr�r�zPme <foo@example.com>, bing: fiz <z@b.com>, zif <f@c.com>;, you <bar@example.com>�(�Zmax_line_lengthrzWto: me <foo@example.com>,
 bing: fiz <z@b.com>, zif <f@c.com>;,
 you <bar@example.com>
)r6r	r
r;rZrr[�cloner<rrr�$test_set_from_Address_and_Group_listWs
�
��z6TestAddressHeader.test_set_from_Address_and_Group_listc
Cs8|�dtdtddd�tddd�g�g�}|�|d	�dS)
Nr�r�r�r�r�r�r�r�z#bing: fiz <z@b.com>, zif <f@c.com>;)r6r
r	r;r<rrr�test_set_from_Group_listcs

�z*TestAddressHeader.test_set_from_Group_list)r$r%r&rr�ZObsoleteHeaderDefectr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�<s4�
�
�
�
�
�
�

�
�

�

�
�
�
�
���� #r�c@seZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dES)F�TestAddressAndGroupcCs<|�t��t||d�Wd�dS1swYdS)NrC)rDrErF)r�objrGrrrrHk�"�z!TestAddressAndGroup._test_attr_rocC�|�tddd�d�dS)NrCr�r�r��rHr	rKrrr�test_address_display_name_roo�z0TestAddressAndGroup.test_address_display_name_rocCr)NrCr�r�r�rrKrrr�test_address_username_rorrz,TestAddressAndGroup.test_address_username_rocCr)NrCr�r�r�rrKrrr�test_address_domain_rourz*TestAddressAndGroup.test_address_domain_rocC�|�td�d�dS)NrCr��rHr
rKrrr�test_group_display_name_rox�z.TestAddressAndGroup.test_group_display_name_rocCr)NrCr�rrKrrr�test_group_addresses_ro{r
z+TestAddressAndGroup.test_group_addresses_rocC�Xtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrCr�r��bar@baz�
foo <bar@baz>�r	r;r�r�r�r�r:�rr�rrr�!test_address_from_username_domain~�z5TestAddressAndGroup.test_address_from_username_domaincCsXtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrCr
�r�r�r�rrrrrr�test_address_from_addr_spec�rz/TestAddressAndGroup.test_address_from_addr_speccCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr
rrQr�r�rrrrr�!test_address_with_no_display_name�s
z5TestAddressAndGroup.test_address_with_no_display_namecCsRt�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrQr�rrrrr�test_null_address�sz%TestAddressAndGroup.test_null_addresscCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)N�buzz�r�rQz@buzzrrrrr�test_domain_only��
z$TestAddressAndGroup.test_domain_onlycCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr�r�rQrrrrr�test_username_only�rz&TestAddressAndGroup.test_username_onlycCsTtd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrrQr�zbuzz <>rrrrr�test_display_name_only�sz*TestAddressAndGroup.test_display_name_onlycCr)NzSara J.zbad namer�z"bad name"@example.comz""Sara J." <"bad name"@example.com>rrrrr�test_quoting�sz TestAddressAndGroup.test_quotingcCr)NrbZwokuexàmple.comuwok@exàmple.comuÉric <wok@exàmple.com>rrrrr�	test_il8n�rzTestAddressAndGroup.test_il8ncCs�tdd�tdd�tdd�tdd�tdd�tdd�td	d
�tdd
�tdd
�td
d�tdd�tdd�f}|D]5}|j|d��%|�td��tdi|��Wd�n1sUwYWd�n1sdwYq4dS)Nzfoo
)r�zfoo
zfoo
zexample.com
rzexample.com
z
example.com
zwok
rzwok
zwok
zwok@example.com
rzwok@example.com
zwok@example.com
)�kwargszinvalid argumentsr)�dictZsubTestZassertRaisesRegex�
ValueErrorr	)r�casesr rrr�$test_crlf_in_constructor_args_raises�s*�����z8TestAddressAndGroup.test_crlf_in_constructor_args_raisescC�<|�t��tddd�Wd�dS1swYdS)NrCuwők@example.comr�rDr"r	rKrrr�+test_non_ascii_username_in_addr_spec_raises�rz?TestAddressAndGroup.test_non_ascii_username_in_addr_spec_raisescC�>|�t��tdddd�Wd�dS1swYdS)NrCr�r
)r�r��rDr�r	rKrrr�*test_address_addr_spec_and_username_raises��"�z>TestAddressAndGroup.test_address_addr_spec_and_username_raisescCr()NrCr�r
)r�r�r)rKrrr�(test_address_addr_spec_and_domain_raises�r+z<TestAddressAndGroup.test_address_addr_spec_and_domain_raisescCs@|�t��tddddd�Wd�dS1swYdS)NrCZbongr�r
)r�r�r�r)rKrrr�5test_address_addr_spec_and_username_and_domain_raises�s"�zITestAddressAndGroup.test_address_addr_spec_and_username_and_domain_raisescCr%)NrCzbad name@example.comrr&rKrrr�'test_space_in_addr_spec_username_raises�rz;TestAddressAndGroup.test_space_in_addr_spec_username_raisescCr%)NrCzname@ex[]ample.comrr&rKrrr�test_bad_addr_sepc_raises�rz-TestAddressAndGroup.test_bad_addr_sepc_raisescC�:td�}|�|jd�|�|jt��|�t|�d�dS)NrCr��r
r;r�r�rTr:�r�grrr�test_empty_group��z$TestAddressAndGroup.test_empty_groupcCs>tdgd�}|�|jd�|�|jt��|�t|�d�dS)NrC�r�r�r1r2rrr�test_empty_group_listsz)TestAddressAndGroup.test_empty_group_listcCs6t�}|�|j�|�|jt��|�t|�d�dS)NzNone:;)r
ryr�r;r�rTr:r2rrr�test_null_groupsz#TestAddressAndGroup.test_null_groupcCsVtddd�tddd�g}td|�}|�|jd�|�|jt|��|�t|�d�dS)N�b�cr�rCzfoo: b <b@c>, a <b@c>;)r	r
r;r�r�rTr:�rZaddrsr3rrr�test_group_with_addressess

z-TestAddressAndGroup.test_group_with_addressescCsTtddd�tddd�g}t|d�}|�|j�|�|jt|��|�t|�d�dS)Nr9r:r�r6zNone: b <b@c>, a <b@c>;�r	r
ryr�r;r�rTr:r;rrr�)test_group_with_addresses_no_display_names

z=TestAddressAndGroup.test_group_with_addresses_no_display_namecCsJtddd�g}t|d�}|�|j�|�|jt|��|�t|�d�dS)Nr9r:r6zb <b@c>r=r;rrr�+test_group_with_one_address_no_display_names

z?TestAddressAndGroup.test_group_with_one_address_no_display_namecCr0)Nzfoo.barz"foo.bar":;r1r2rrr�test_display_name_quoting!r5z-TestAddressAndGroup.test_display_name_quotingcCr0)Nr��	foo bar:;r1r2rrr�#test_display_name_blanks_not_quoted'r5z7TestAddressAndGroup.test_display_name_blanks_not_quotedcCsHtddd�}ttjd�}||d<|�|dd�|�|dj|f�dS)NrCr�r�r�Tor�zfoo <bar@example.com>)r	rrr[r;r�)rr�r�rrr�$test_set_message_header_from_address-s
z8TestAddressAndGroup.test_set_message_header_from_addresscCsDtd�}ttjd�}||d<|�|dd�|�|dj|j�dS)Nr�rrCr�rA)r
rrr[r;r�)rr3r�rrr�"test_set_message_header_from_group4s
z6TestAddressAndGroup.test_set_message_header_from_groupcCs~tddd�}|�tddd�|�|�tddd�|�|�tddd�|�|�tddd�|�|�|t�k�|�|tk�dS)NrCr�r�r�)r	r;�assertNotEqual�assertFalse�object�
assertTruerrrrr�test_address_comparison;sz+TestAddressAndGroup.test_address_comparisoncCsttddd�}td|g�}|�td|f�|�|�td|g�|�|�tdg�|�|�|t�k�|�|tk�dS)NrCr�r�r�r�)r	r
r;rFrGrHrIr)rr�r3rrr�test_group_comparisonDsz)TestAddressAndGroup.test_group_comparisonN)%r$r%r&rHrrrr	rrrrrrrrrrr$r'r*r,r-r.r/r4r7r8r<r>r?r@rBrDrErJrKrrrrr�isF		

	r�c@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�TestFoldingcCs@dD]\}}|�dt|dd��}|�|jtjd�d|�qdS)z1Test the folding and encoding of address headers.)	)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?=rCza@b.comrrzTo: %s <a@b.com>
N)r6r	r;rZrr[)rr4�resultrrrr�test_address_display_namesPs��z&TestFolding.test_address_display_namescC�&|�dd�}|�|jtjd�d�dS)Nr/r9rzsubject: this is a test
�r6r;rZrr[r<rrr�test_short_unstructuredh��z#TestFolding.test_short_unstructuredcCrO)NrzhThis 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
rPr<rrr�test_long_unstructuredms�z"TestFolding.test_long_unstructuredcC�4|�dd�}|�|jtjjdd�d�t�d��dS)Nrz1this is a short header that will be folded anywayrgr�rz�                Subject: this is a
                 short header that
                 will be folded
                 anyway
                �r6r;rZrr[r��textwrap�dedentr<rrr�'test_unstructured_short_max_line_lengthvs
�z3TestFolding.test_unstructured_short_max_line_lengthcCrO)NrrrzSubject: test
rPr<rrr�"test_fold_unstructured_single_word�sz.TestFolding.test_fold_unstructured_single_wordcCrO)Nrztest test testrzSubject: test test test
rPr<rrr�test_fold_unstructured_short�rRz(TestFolding.test_fold_unstructured_shortcC�.|�dd�}|�|jtjjdd�d�d�dS)NrZ5thisisaverylonglineconsistingofasinglewordthatwontfitrgr�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?=
�r6r;rZrr[r�r<rrr�)test_fold_unstructured_with_overlong_word��
�z5TestFolding.test_fold_unstructured_with_overlong_wordcCr[)NrzXthisisaverylonglineconsistingofasinglewordthatwontfit plusanotherverylongwordthatwontfitrgr�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\r<rrr�.test_fold_unstructured_with_two_overlong_words�r^z:TestFolding.test_fold_unstructured_with_two_overlong_wordscCr[)NrZ thislongwordislessthanmaxlinelen�#r�rz+Subject:
 thislongwordislessthanmaxlinelen
r\r<rrr�.test_fold_unstructured_with_slightly_long_word�s
�z:TestFolding.test_fold_unstructured_with_slightly_long_wordcCrT)Nrz�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.
                 rUr<rrr�"test_fold_unstructured_with_commas�s
�z.TestFolding.test_fold_unstructured_with_commascCs,|�dd�}|�|jtjd�t�d��dS)NrCz�"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>
             )r6r;rZrr[rVrWr<rrr�test_fold_address_list�s z"TestFolding.test_fold_address_listcCrO)Nr�zSat, 2 Feb 2002 17:00:06 -0800rz&Date: Sat, 02 Feb 2002 17:00:06 -0800
rPr<rrr�test_fold_date_header�rRz!TestFolding.test_fold_date_headercCrO)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?=
rPr<rrr�&test_fold_overlong_words_using_RFC2047�s��z2TestFolding.test_fold_overlong_words_using_RFC2047cCs�|�dd�}|�|jtjjdd�d�d�|�dd�}|�|jtjjdd�d�d�|�dd	�}|�|jtjjd
d�d�d�|�dd�}|�|jtjjdd�d�d
�dS)Nz
Message-IDz+<somemessageidlongerthan@maxlinelength.com>rgr�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\r<rrr�$test_message_id_header_is_not_folded�s4������z0TestFolding.test_message_id_header_is_not_foldedN)r$r%r&rNrQrSrXrYrZr]r_rarcrdrerfrhrrrrrLNs	


rL�__main__)!rlrVZunittestZemailrrZ
email.messagerZtest.test_emailrrrZemail.headerregistryr	r
Ztest.supportrrHr�rr3r7rVrdr�r�r�r�r�r�rLr$�mainrrrr�<module>sT:.(A;'R.f1�