Your IP : 216.73.216.213


Current Path : /opt/alt/python39/lib64/python3.9/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/test/test_email/__pycache__/test_headerregistry.cpython-39.pyc

a

XC?h|��@slddlZddlZddlZddlmZddlmZddlmZddlm	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!k�rhe� �dS)"�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�H/opt/alt/python39/lib64/python3.9/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 sr'cCs8tj|jd�}|dd�}|�||j�|�|tj�dS)N)Z
base_classrr)rrr'rrrrrr� test_override_default_base_class$s
z3TestHeaderRegistry.test_override_default_base_classc@seZdZejjZdS)zTestHeaderRegistry.FooDefaultN)r$r%r&rr�parserrrr�
FooDefault*sr*cCs8tj|jd�}|dd�}|�|tj�|�||j�dS)N�Z
default_classrr)rrr*rrrrrr�test_override_default_class-s
z.TestHeaderRegistry.test_override_default_classcCs8tj|jd�}|dd�}|�|tj�|�|tj�dS)Nr+�subjectr)rrr*rrrrrrr�2test_override_default_class_only_overrides_default3s
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,r.r/r0rrrrrsrc@seZdZe��Zdd�ZdS)�TestHeaderBasecCs|�||�Sr )r)r�name�valuerrr�make_headerNszTestHeaderBase.make_headerN)r$r%r&rrrr4rrrrr1Jsr1c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TestBaseHeaderFeaturescCs8|�dd�}|�|t�|�|d�|�t|�d�dS�Nr-�this is a test)r4r�str�assertEqual�rrrrr�test_strTszTestBaseHeaderFeatures.test_strcCs$|�dd�}|�|dd�d�dS)Nr-r7���is)r4r9r:rrr�test_substrZsz"TestBaseHeaderFeatures.test_substrcCs|�dd�}|�|jd�dSr6)r4r9r2r:rrr�
test_has_name^sz$TestBaseHeaderFeatures.test_has_namecCsF|�dd�}|�t��t||d�Wd�n1s80YdS)Nr-r7�foo)r4�assertRaises�AttributeError�setattr)r�attrrrrr�
_test_attr_robsz$TestBaseHeaderFeatures._test_attr_rocCs|�d�dS)Nr2�rF�rrrr�test_name_read_onlygsz*TestBaseHeaderFeatures.test_name_read_onlycCs|�d�dS)N�defectsrGrHrrr�test_defects_read_onlyjsz-TestBaseHeaderFeatures.test_defects_read_onlycCs\|�dd�}|�t|j�d�|�|jt�|�dd�}|�t|j�d�|�|jt�dS)Nr-r7r�date��)r4r9�lenrJr�tupler:rrr�test_defects_is_tuplemsz,TestBaseHeaderFeatures.test_defects_is_tupleN)
r$r%r&r;r?r@rFrIrKrQrrrrr5Rsr5c@s2eZdZdd�Zddgdfddgdfdd	d
�ZdS)�TestUnstructuredHeaderc	Gs�t|�}|dkr|dng}d|r&dnd}||dkr>|dn|d}|�d|�}|�||�|�|j|�|�|jtjd�|�dS)	NrzSubject:� rMrN�
rr)rOr4r9�assertDefectsEqualrJ�foldr�default)	r�source�decodedr!�lrJ�header�foldedrrrr�string_as_value�sz&TestUnstructuredHeader.string_as_valuez=?utf-8?q?this_is_a_test?=r7z!=?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&r]Z
string_paramsrrrrrR�s���rRc	@sveZdZdZejdd�Ze�e�Zejdddddd	ed
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�TestDateHeaderzSun, 23 Sep 2001 20:10:55 -0700i����)Zhoursi��	���
�7)ZtzinfocCsR|�d|j�}|�||j�|�|j|j�|�|j��|j�|�|jd�dS�NrLr)r4�
datestringr9�datetime�dt�	utcoffsetrJr:rrr�test_parse_date�s
zTestDateHeader.test_parse_datecCs>|�d|j�}|�||j�|�|j|j�|�|jd�dSrf)r4rir9rgrhrJr:rrr�test_set_from_datetime�sz%TestDateHeader.test_set_from_datetimecCs<|�d|j�}|�|tj�|�|jd�|�|jd�dS)NrLrNr)r4rgrrZUniqueDateHeaderr9�	max_countrJr:rrr�test_date_header_properties�sz*TestDateHeader.test_date_header_propertiescCs<|�d|j�}|�|tj�|�|jd�|�|jd�dS)Nzresent-dater)r4rgrrZ
DateHeaderr9rmrJr:rrr�"test_resent_date_header_properties�sz1TestDateHeader.test_resent_date_header_propertiescCs6|�dd�}|�t|j�d�|�|jdtj�dS)NrLrMrNr)r4r9rOrJrr�HeaderMissingRequiredValuer:rrr�test_no_value_is_defect�sz&TestDateHeader.test_no_value_is_defectcCsB|�d|j�}|�t��d|_Wd�n1s40YdS)NrLrA)r4rgrBrCrhr:rrr�test_datetime_read_only�sz&TestDateHeader.test_datetime_read_onlycCs@ttjd�}|j|d<|�|d|j�|�|dj|j�dS)Nr�Date)rrrWrir9rgrh)r�mrrr�"test_set_date_header_from_datetime�s
z1TestDateHeader.test_set_date_header_from_datetimeN)r$r%r&rgrhZ	timedeltarj�timezoneZtzrirkrlrnrorqrrrurrrrr`�s
r`c6@s�eZdZdd�Zddddddigd	fd
dddddigd	fd	dddddifddddiejgfddddiejgfd
dddiejgfddddiejgfddddddddddifddddddifddddddifddddddigdfddddddigdfddddddifd ddddd!ifd"dddd#d#d$�ejgd%fd&d'd(d)d*d+igd,fd-d.d/d0d1d2d3d4�gd5d6fd7d.d/d0d1d2d3d8d9�gd7d:fd;d.d/d0d<d=ifd>d.d/d0d<d?ifd@d.d/d0d<dAigd@fdB�dC��ddD�dEdFdGdHdIdJ�ejgd%dKdLfdMd.d/d0d<dNigdOfdPd.d/d0dGdQigdRfdS�dC��ddD�dddddTdU�ejgdVdWfdXdddddigd	fdYdddd<dZigd[fd\dddd<d]iejgd^d_fd`dddddadU�ejgd^dbdcfdddedfdgd<dhiejgd^difdjdedfdgd<dkigdlfdmdddd<dniejgdofdpdddd<dqiejgd^drfdpdddd<dqiejgd^drfdsdddd<dtiejgdudvfdwdddd<dxigdyfdzddddd{iejgd|d}fd~dddddiejgd�d�fd�dddddigd�d�fd�dedfdgd<d�iejgd�fd�dedfdgd<d�iejgd%d�fd�dedfdgd<d�iejgd^d�fd�dedfdgd<d�igd�d�fd��/Z	d�S)��TestContentTypeHeaderc
Gs$t|�}|dkr|dni}|dkr,|dng}|dkrL|dturL|dn|}	|rXdnd}
|dkrl|dn
|
|	d}|�d|�}|�|j|�|�|j|�|�|j|�|�|j|�|�t	��d	|jd
<Wd�n1s�0Y|�
|j|�|�||	�|�|jt
jd�|�dS)NrrN�zContent-Type: rM�rTzContent-TypeZxyz�abcr)rO�DITTOr4r9�content_type�maintype�subtype�paramsrB�	TypeErrorrUrJrVrrW)
rrXr|r}r~r!rZ�parmdictrJrYr[r\rrrr�content_type_as_value�s  (z+TestContentTypeHeader.content_type_as_valuez)text/plain; charset=us-ascii (Plain text)�
text/plain�text�plain�charsetzus-asciiztext/plain; charset="us-ascii"ztext/plain; charset=us-asciiztext/rAz<crazy "stuff">zimage/jpeg/foo)�	bad/namesr�Zbad�names)z
ImAge/JPeg�
image/jpeg�image�jpeg)z  text  /  plain  r�r�r�)z"(foo) text (bar)/(baz)plain(stuff)r�r�r�ztext/plain; charset="utf-8"zutf-8ztext/plain; charset="US-ASCII"zUS-ASCIIztext/plain; charset="fOo"ZfOoz*text/plain; (interjection) Charset="utf-8"ztext/plain; Charset="utf-8"ztext/plain; title=foo�titleztext/plain; title="foo"z!text/plain; title="(bar)foo blue"z
(bar)foo bluez0text/plain; title="  a     loong  way 	 home   "z  a     loong  way 	 home   zblarg; baz; boorM)�bazZbooryz0Multipart/mixed; boundary = "CPIMSSMTPC06p5f3tG"zmultipart/mixedZ	multipartZmixed�boundaryZCPIMSSMTPC06p5f3tGz.Multipart/mixed; boundary="CPIMSSMTPC06p5f3tG"zPimage/jpeg; name="wibble.JPG" ; x-mac-type="4A504547" ; x-mac-creator="474B4F4E"r�r�r�z
wibble.JPGZ4A504547Z474B4F4E)r2�
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"
zmimage/jpeg; name="wibble.JPG"; x-mac-type="4A504547"; x-mac-creator="474B4F4E"; x-extrastuff="make it longer"zmake it longer)r2r�r�zx-extrastuffz}Content-Type: image/jpeg; name="wibble.JPG"; x-mac-type="4A504547";
 x-mac-creator="474B4F4E"; x-extrastuff="make it longer"
z$image/jpeg; name="Jim&amp;&amp;Jill"r2zJim&amp;&amp;Jillz!image/jpeg; name="Jim 'Bob' Jill"zJim 'Bob' Jillz#image/jpeg; name="Jim \"Bob\" Jill"zJim "Bob" Jillufoo§/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
z(image/jpeg; name*0="abc"; name*1=".html"zabc.htmlzimage/jpeg; name="abc.html"z.image/jpeg; bar*0="baz\"foobar"; bar*1="\"baz"zbaz"foobar"bazz"image/jpeg; bar="baz\"foobar\"baz"uGtext/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
z-text/plain; charset*=ansi-x3.4-1968''us-asciiz\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"zvtext/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.pdfrxz<text/plain; name="This is even more ***fun*** is it not.pdf"z�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!"
zHapplication/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
)/�
RFC_2045_1�
RFC_2045_2�
RFC_2045_3Zno_subtype_in_content_typeZno_slash_in_content_typeZjunk_text_in_content_typeZ too_many_slashes_in_content_typeZunknown_content_typeZmixed_case_content_typeZspaces_in_content_typeZcfws_in_content_typeZ
charset_paramZcapitalized_charsetZunknown_charsetZ*capitalized_charset_param_name_and_commentZunquoted_param_valueZparam_value_with_tspecialsZ"param_with_extra_quoted_whitespaceZ
bad_paramsZspaces_around_param_equalsZspaces_around_semisZlots_of_mime_paramsZsemis_inside_quotesZsingle_quotes_inside_quotesZdouble_quotes_inside_quotesZnon_ascii_in_paramsZrfc2231_segmented_normal_valuesZquotes_inside_rfc2231_valueZnon_ascii_rfc2231_valueZrfc2231_encoded_charsetZ rfc2231_encoded_no_double_quotesZ"rfc2231_encoded_with_double_quotesZ)rfc2231_single_quote_inside_double_quotesZ3rfc2231_single_quote_in_value_with_charset_and_langZ)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_paramsrrrrrw�s��
�
��	�	�	��������
�	��������
��
��
�
�����
�
�
���

�
���
�
��
�
�
�������rwc@s8eZdZdd�Zdddejgddfddejgfd�Zd	S)
�TestContentTransferEncodingc
Gs�t|�}|dkr|dng}|dkr8|dtur8|dn|}|rDdnd}|dkrX|dn
||d}|�d|�}	|�|	j|�|�|	j|�|�|	|�|�|	jtj	d�|�dS)	NrrNzContent-Transfer-Encoding: rMrxrTzContent-Transfer-Encodingr)
rOr{r4r9�cterUrJrVrrW)
rrXr�r!rZrJrYr[r\rrrr�cte_as_values z(TestContentTransferEncoding.cte_as_value)�base64r�rMZ7bitzContent-Transfer-Encoding:
z7bit and a bunch more)�
RFC_2183_1�no_valueZjunk_after_cteN)r$r%r&r�rrpr�Z
cte_paramsrrrrr�s�	��r�c@s�eZdZdd�Zdddddd�gd	d
fddiejgdd
fddiejgfddddiejgfddddiejgdddfddddiejgddfd�ZdS)�TestContentDispositioncGs�t|�}|dkr|dni}|dkr,|dng}|dkrL|dturL|dn|}|rXdnd}|dkrl|dn
||d}	|�d|�}
|�|
j|�|�|
j|�|�|
j|�|�|
|�|�|
jt	j
d	�|	�dS)
NrrNrxzContent-Disposition: rMryrTzContent-Dispositionr)rOr{r4r9�content_dispositionrrUrJrVrrW)rrXr�r!rZr�rJrYr[r\rrrr�content_disp_as_value>s 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"
rMNzContent-Disposition:
zab./kzab.zab./k; filename="foo"r�rAzaattachment; filename="=?UTF-8?Q?Schulbesuchsbest=C3=A4ttigung=2E?=               =?UTF-8?Q?pdf?="uSchulbesuchsbestättigung.pdfryu4attachment; 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�rrpr�Zcontent_disp_paramsrrrrr�;sV���	��
���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-VersionrSrz
MIME-Version:rT)
r4r9�version�major�minorrUrJrVrrW)rrXrYr�r�r�rJrrrr�version_string_as_MIME_Version�s
�z4TestMIMEVersionHeader.version_string_as_MIME_Versionz1.0rNrz1.0 (produced by MetaSend Vx.x)z(produced by MetaSend Vx.x) 1.0z1.(produced by MetaSend Vx.x)0z1.1z2.1rxz1 .0z  1.0  z	1.0 <abc>z	<abc> 1.0Nz1.<abc>0z1..0z2.xrArM)r�r�r�Z
RFC_2045_4Z1_1Z2_1Z
whitespaceZ#leading_trailing_whitespace_ignoredZnon_comment_garbage_afterZnon_comment_garbage_beforeZnon_comment_garbage_insideZtwo_periodsZ2_xrAZmissing)r$r%r&r�rr�rpZversion_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�<>rMNzzippy@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.comryz"example example"@example.comzexample examplez!"\"example\" example"@example.comz"example" examplez#"\\"example\\" example"@example.comr<z#"\\example\\\\ example"@example.comz\example\\ examplezmerwok  wok  @example.comrxz"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>r^�foo@example.comrAz6The =?utf-8?q?=C3=89ric=2C?= Himself <foo@example.com>u&"The Éric, Himself" <foo@example.com>r_z)"=?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�senderrNr)r4r9rUrJ�addressr8rO�groups�list�	addresses�display_name�	addr_spec�username�domain)rrXrJrYr�r�r�r��commentr�arrr�example_as_address�sz$TestAddressHeader.example_as_addressc	Cs�d�|�}|rd�|�nd}	|�d|�}
|�|
|	�|�|
j|�|�|
jdj|
j�|�t|
j�d�|�t|
j�d�|
jd}|�t|�|�|�|j	|�|�|j
|�|�|j|�|�|j|�dS)Nzfoo: {};�foo:;�torrN)
�formatr4r9rUrJr�r�rOr8r�r�r�r�)rrXrJrYr�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|�qH|�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�ryrzFred <dinsdale@python.org>rNr�rxz'"Harry W. Hastings" <hasty@example.com>zHarry W. Hastings)r4r9rOr�r��ranger8r�)rr3r�irrr�test_simple_address_list�s ��z*TestAddressHeader.test_simple_address_listcCsnt|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]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��q(dS)Nz dummy list:;, another: (empty);,z, cSsg|]}|d�qS�rr��.0�xrrr�
<listcomp>�z?TestAddressHeader.test_complex_address_list.<locals>.<listcomp>�z"A \"list\"": cSsg|]}|d�qSr�rr�rrrr�r��z;,cSsg|]}|d�qSr�rr�rrrr�r�zdummy list:;, another:;, cSsg|]}|d�qS�rxrr�rrrr�r�cSsg|]}|d�qSr�rr�rrrr�
r�z;, cSsg|]}|d�qSr�rr�rrrr�r�r��,r=rz
dummy listrNZanotherzA "list"rx)r��example_params�values�joinr4r9�splitrOr�r�r�r��assertIsNoner8r�)rZexamplesrXZexpectedrr�rrr�test_complex_address_listsX������������,,z+TestAddressHeader.test_complex_address_listcCs@|�dd�}|�t��d|_Wd�n1s20YdS�Nr�zabc@xyz.comrA)r4rBrCr�r:rrr�test_address_read_only#sz(TestAddressHeader.test_address_read_onlycCs@|�dd�}|�t��d|_Wd�n1s20YdSr�)r4rBrCr�r:rrr�test_addresses_read_only(sz*TestAddressHeader.test_addresses_read_onlycCs@|�dd�}|�t��d|_Wd�n1s20YdSr�)r4rBrCr�r:rrr�test_groups_read_only-sz'TestAddressHeader.test_groups_read_onlycCs4d}|�d|�}|�|jt�|�|jdt�dS�Nzme <who@example.com>r�r)r4rr�rPr	�rrXrrrr�test_addresses_types2sz&TestAddressHeader.test_addresses_typescCs4d}|�d|�}|�|jt�|�|jdt�dSr�)r4rr�rPr
r�rrr�test_groups_types8sz#TestAddressHeader.test_groups_typescCs$|�dtddd��}|�|d�dS)Nr��merAr�zme <foo@example.com>�r4r	r9r:rrr�test_set_from_Address>sz'TestAddressHeader.test_set_from_AddresscCs0|�dtddd�tddd�g�}|�|d�dS)Nr�r�rAr��your�z+me <foo@example.com>, you <bar@example.com>r�r:rrr�test_set_from_Address_listBs
�z,TestAddressHeader.test_set_from_Address_listcCsj|�dtddd�tdtddd�td	d
d�g�tdd
d�g�}|�|d�|�|jtjjdd�d�d�dS)Nr�r�rAr��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>
)r4r	r
r9rVrrW�cloner:rrr�$test_set_from_Address_and_Group_listGs
�
��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>;)r4r
r	r9r:rrr�test_set_from_Group_listSs
�
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�,s2�
�
�
�
�
�
�

�
�

�

�
�
�
�
���� #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�n1s,0YdS)NrA)rBrCrD)r�objrErrrrF[sz!TestAddressAndGroup._test_attr_rocCs|�tddd�d�dS)NrAr�r�r��rFr	rHrrr�test_address_display_name_ro_sz0TestAddressAndGroup.test_address_display_name_rocCs|�tddd�d�dS)NrAr�r�r�r�rHrrr�test_address_username_robsz,TestAddressAndGroup.test_address_username_rocCs|�tddd�d�dS)NrAr�r�r�r�rHrrr�test_address_domain_roesz*TestAddressAndGroup.test_address_domain_rocCs|�td�d�dS)NrAr��rFr
rHrrr�test_group_display_name_rohsz.TestAddressAndGroup.test_group_display_name_rocCs|�td�d�dS)NrAr�r�rHrrr�test_group_addresses_roksz+TestAddressAndGroup.test_group_addresses_rocCsXtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrAr�r��bar@baz�
foo <bar@baz>�r	r9r�r�r�r�r8�rr�rrr�!test_address_from_username_domainnsz5TestAddressAndGroup.test_address_from_username_domaincCsXtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrAr��r�r�r�r�r�r�rrr�test_address_from_addr_specvsz/TestAddressAndGroup.test_address_from_addr_speccCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr�r�rMr�r�r�r�rrr�!test_address_with_no_display_name~s
z5TestAddressAndGroup.test_address_with_no_display_namecCsRt�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NrMr�r�r�rrr�test_null_address�sz%TestAddressAndGroup.test_null_addresscCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)N�buzz�r�rMz@buzzr�r�rrr�test_domain_only�s
z$TestAddressAndGroup.test_domain_onlycCsVtdd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr��r�rMr�r�rrr�test_username_only�s
z&TestAddressAndGroup.test_username_onlycCsTtd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr�rMr�zbuzz <>r�r�rrr�test_display_name_only�sz*TestAddressAndGroup.test_display_name_onlycCsXtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)NzSara J.zbad namer�z"bad name"@example.comz""Sara J." <"bad name"@example.com>r�r�rrr�test_quoting�sz TestAddressAndGroup.test_quotingcCsXtddd�}|�|jd�|�|jd�|�|jd�|�|jd�|�t|�d�dS)Nr^Zwokuexàmple.comuwok@exàmple.comuÉric <wok@exàmple.com>r�r�rrr�	test_il8n�szTestAddressAndGroup.test_il8ncCs�tdd�tdd�tdd�tdd�tdd�tdd�td	d
�tdd
�tdd
�td
d�tdd�tdd�f}|D]j}|j|d��J|�td��tfi|��Wd�n1s�0YWd�qh1s�0YqhdS)Nzfoo
)r�zfoo
zfoo
zexample.com
r�zexample.com
z
example.com
zwok
rzwok
zwok
zwok@example.com
r�zwok@example.com
zwok@example.com
)�kwargszinvalid arguments)�dictZsubTestZassertRaisesRegex�
ValueErrorr	)rZcasesrrrr�$test_crlf_in_constructor_args_raises�s �z8TestAddressAndGroup.test_crlf_in_constructor_args_raisescCs:|�t��tddd�Wd�n1s,0YdS)NrAuwők@example.comr��rBrr	rHrrr�+test_non_ascii_username_in_addr_spec_raises�sz?TestAddressAndGroup.test_non_ascii_username_in_addr_spec_raisescCs<|�t��tdddd�Wd�n1s.0YdS)NrAr�r�)r�r��rBr�r	rHrrr�*test_address_addr_spec_and_username_raises�sz>TestAddressAndGroup.test_address_addr_spec_and_username_raisescCs<|�t��tdddd�Wd�n1s.0YdS)NrAr�r�)r�r�rrHrrr�(test_address_addr_spec_and_domain_raises�sz<TestAddressAndGroup.test_address_addr_spec_and_domain_raisescCs>|�t�� tddddd�Wd�n1s00YdS)NrAZbongr�r�)r�r�r�rrHrrr�5test_address_addr_spec_and_username_and_domain_raises�szITestAddressAndGroup.test_address_addr_spec_and_username_and_domain_raisescCs:|�t��tddd�Wd�n1s,0YdS)NrAzbad name@example.comr�r	rHrrr�'test_space_in_addr_spec_username_raises�sz;TestAddressAndGroup.test_space_in_addr_spec_username_raisescCs:|�t��tddd�Wd�n1s,0YdS)NrAzname@ex[]ample.comr�r	rHrrr�test_bad_addr_sepc_raises�sz-TestAddressAndGroup.test_bad_addr_sepc_raisescCs:td�}|�|jd�|�|jt��|�t|�d�dS)NrAr��r
r9r�r�rPr8�r�grrr�test_empty_group�sz$TestAddressAndGroup.test_empty_groupcCs>tdgd�}|�|jd�|�|jt��|�t|�d�dS)NrA�r�r�rrrrr�test_empty_group_list�sz)TestAddressAndGroup.test_empty_group_listcCs6t�}|�|j�|�|jt��|�t|�d�dS)NzNone:;)r
r�r�r9r�rPr8rrrr�test_null_group�sz#TestAddressAndGroup.test_null_groupcCsVtddd�tddd�g}td|�}|�|jd�|�|jt|��|�t|�d�dS)N�b�cr�rAzfoo: b <b@c>, a <b@c>;)r	r
r9r�r�rPr8�rZaddrsrrrr�test_group_with_addresses�s

z-TestAddressAndGroup.test_group_with_addressescCsTtddd�tddd�g}t|d�}|�|j�|�|jt|��|�t|�d�dS)Nrrr�rzNone: b <b@c>, a <b@c>;�r	r
r�r�r9r�rPr8rrrr�)test_group_with_addresses_no_display_names

z=TestAddressAndGroup.test_group_with_addresses_no_display_namecCsJtddd�g}t|d�}|�|j�|�|jt|��|�t|�d�dS)Nrrrzb <b@c>rrrrr�+test_group_with_one_address_no_display_name
s

z?TestAddressAndGroup.test_group_with_one_address_no_display_namecCs:td�}|�|jd�|�|jt��|�t|�d�dS)Nzfoo.barz"foo.bar":;rrrrr�test_display_name_quotingsz-TestAddressAndGroup.test_display_name_quotingcCs:td�}|�|jd�|�|jt��|�t|�d�dS)Nr��	foo bar:;rrrrr�#test_display_name_blanks_not_quotedsz7TestAddressAndGroup.test_display_name_blanks_not_quotedcCsHtddd�}ttjd�}||d<|�|dd�|�|dj|f�dS)NrAr�r�r�Tor�zfoo <bar@example.com>)r	rrrWr9r�)rr�rtrrr�$test_set_message_header_from_addresss
z8TestAddressAndGroup.test_set_message_header_from_addresscCsDtd�}ttjd�}||d<|�|dd�|�|dj|j�dS)Nr�rr"r�r )r
rrrWr9r�)rrrtrrr�"test_set_message_header_from_group$s
z6TestAddressAndGroup.test_set_message_header_from_groupcCs~tddd�}|�tddd�|�|�tddd�|�|�tddd�|�|�tddd�|�|�|t�k�|�|tk�dS)NrAr�r�r�)r	r9�assertNotEqual�assertFalse�object�
assertTruerr�rrr�test_address_comparison+sz+TestAddressAndGroup.test_address_comparisoncCsttddd�}td|g�}|�td|f�|�|�td|g�|�|�tdg�|�|�|t�k�|�|tk�dS)NrAr�r�r�r�)r	r
r9r%r&r'r(r)rr�rrrr�test_group_comparison4sz)TestAddressAndGroup.test_group_comparisonN)%r$r%r&rFr�r�r�r�r�r�r�r�r�r�rrrrrr
rr
rrrrrrrrrrr!r#r$r)r*rrrrr�YsD		

	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]6\}}|�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?=r"za@b.comr�rzTo: %s <a@b.com>
N)r4r	r9rVrrW)rr2�resultrrrr�test_address_display_names@s
�z&TestFolding.test_address_display_namescCs&|�dd�}|�|jtjd�d�dS)Nr-r7rzsubject: this is a test
�r4r9rVrrWr:rrr�test_short_unstructuredXs�z#TestFolding.test_short_unstructuredcCs&|�dd�}|�|jtjd�d�dS)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
r.r:rrr�test_long_unstructured]s�z"TestFolding.test_long_unstructuredcCs4|�dd�}|�|jtjjdd�d�t�d��dS)Nrz1this is a short header that will be folded anywayrcr�rz�                Subject: this is a
                 short header that
                 will be folded
                 anyway
                �r4r9rVrrWr��textwrap�dedentr:rrr�'test_unstructured_short_max_line_lengthfs
�z3TestFolding.test_unstructured_short_max_line_lengthcCs&|�dd�}|�|jtjd�d�dS)NrrrzSubject: test
r.r:rrr�"test_fold_unstructured_single_wordrsz.TestFolding.test_fold_unstructured_single_wordcCs&|�dd�}|�|jtjd�d�dS)Nrztest test testrzSubject: test test test
r.r:rrr�test_fold_unstructured_shortvs�z(TestFolding.test_fold_unstructured_shortcCs.|�dd�}|�|jtjjdd�d�d�dS)NrZ5thisisaverylonglineconsistingofasinglewordthatwontfitrcr�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?=
�r4r9rVrrWr�r:rrr�)test_fold_unstructured_with_overlong_word{s
�z5TestFolding.test_fold_unstructured_with_overlong_wordcCs.|�dd�}|�|jtjjdd�d�d�dS)NrzXthisisaverylonglineconsistingofasinglewordthatwontfit plusanotherverylongwordthatwontfitrcr�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?=
r7r:rrr�.test_fold_unstructured_with_two_overlong_words�s
�z:TestFolding.test_fold_unstructured_with_two_overlong_wordscCs.|�dd�}|�|jtjjdd�d�d�dS)NrZ thislongwordislessthanmaxlinelen�#r�rz+Subject:
 thislongwordislessthanmaxlinelen
r7r:rrr�.test_fold_unstructured_with_slightly_long_word�s
�z:TestFolding.test_fold_unstructured_with_slightly_long_wordcCs4|�dd�}|�|jtjjdd�d�t�d��dS)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.
                 r1r:rrr�"test_fold_unstructured_with_commas�s
�z.TestFolding.test_fold_unstructured_with_commascCs,|�dd�}|�|jtjd�t�d��dS)Nr"z�"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>
             )r4r9rVrrWr2r3r:rrr�test_fold_address_list�sz"TestFolding.test_fold_address_listcCs&|�dd�}|�|jtjd�d�dS)NrszSat, 2 Feb 2002 17:00:06 -0800rz&Date: Sat, 02 Feb 2002 17:00:06 -0800
r.r:rrr�test_fold_date_header�s�z!TestFolding.test_fold_date_headercCs&|�dd�}|�|jtjd�d�dS)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?=
r.r: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>rcr�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>
r7r:rrr�$test_message_id_header_is_not_folded�s4������z0TestFolding.test_message_id_header_is_not_foldedN)r$r%r&r-r/r0r4r5r6r8r9r;r=r>r?r@rBrrrrr+>s	


r+�__main__)!rhr2ZunittestZemailrrZ
email.messagerZtest.test_emailrrrZemail.headerregistryr	r
Ztest.supportrr'r{rr1r5rRr`rwr�r�r�r�r�r+r$�mainrrrr�<module>sP:.(1;'R.f1