Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/test/test_email/__pycache__/test_generator.cpython-33.pyc

�
��f�c@s�ddlZddlZddlZddlmZmZddlmZmZddlm	Z	ddl
mZmZeGdd�d��Z
Gdd	�d	e
e�ZGd
d�de
e�Zedkr�ej�ndS(
iN(umessage_from_stringumessage_from_bytes(u	GeneratoruBytesGenerator(upolicy(u
TestEmailBaseuparameterizecBs�|EeZdZejZddd�Ziejd�d6ejd�d6ejd�d6Z	e	de	d	<e	j
�Zd
ed<ded	<dd
�e	D�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS(uTestGeneratorBasecCs.|dkr|jn|}|j|d|�S(Nupolicy(uNoneupolicyumsgfunc(uselfumsgupolicy((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyumsgmakersuTestGeneratorBase.msgmakeruf            To: whom_it_may_concern@example.com
            From: nobody_you_want_to_know@example.com
            Subject: We the willing led by the unknowing are doing the
             impossible for the ungrateful. We have done so much for so long with so little
             we are now qualified to do anything with nothing.

            None
            iu�            To: whom_it_may_concern@example.com
            From:
             nobody_you_want_to_know@example.com
            Subject: We the willing led by the
             unknowing are doing the impossible for
             the ungrateful. We have done so much
             for so long with so little we are now
             qualified to do anything with nothing.

            None
            i(u�            To: whom_it_may_concern@example.com
            From: nobody_you_want_to_know@example.com
            Subject: We the
             willing led by the
             unknowing are doing
             the impossible for
             the ungrateful. We
             have done so much
             for so long with so
             little we are now
             qualified to do
             anything with
             nothing.

            None
            iiduTo: whom_it_may_concern@example.com
From: nobody_you_want_to_know@example.com
Subject: We the willing led by the unknowing are doing the impossible for the ungrateful. We have done so much for so long with so little we are now qualified to do anything with nothing.

None
uTo: whom_it_may_concern@example.com
From: nobody_you_want_to_know@example.com
Subject: We the willing led by the unknowing are doing the impossible for the ungrateful. We have
 done so much for so long with so little we are now qualified to do anything with nothing.

None
cCsg|]}|�qS(((u.0un((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu
<listcomp>Ts	uTestGeneratorBase.<listcomp>cCs�|j|j|jd��}|j�}|j|d|d|j�}|j|�|j|j�|j|j|��dS(Niumaxheaderlenupolicy(	umsgmakerutypurefold_long_expecteduioclassugenclassupolicyuflattenuassertEqualugetvalue(uselfunumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu length_as_maxheaderlen_parameterVs

u2TestGeneratorBase.length_as_maxheaderlen_parametercCs�|j|j|jd��}|j�}|j|d|jjd|��}|j|�|j|j	�|j|j|��dS(Niupolicyumax_line_length(
umsgmakerutypurefold_long_expecteduioclassugenclassupolicyucloneuflattenuassertEqualugetvalue(uselfunumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu length_as_max_line_length_policy]s
$
u2TestGeneratorBase.length_as_max_line_length_policycCs�|j|j|jd��}|j�}|j|d|d|jjdd��}|j|�|j|j	�|j|j|��dS(Niumaxheaderlenupolicyumax_line_lengthi
(
umsgmakerutypurefold_long_expecteduioclassugenclassupolicyucloneuflattenuassertEqualugetvalue(uselfunumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu,length_as_maxheaderlen_parm_overrides_policyds
u>TestGeneratorBase.length_as_maxheaderlen_parm_overrides_policycCs�|j|j|jd��}|j�}|j|d|jjddd|��}|j|�|j|j	�|j|jd��dS(Niupolicyu
refold_sourceunoneumax_line_length(
umsgmakerutypurefold_long_expecteduioclassugenclassupolicyucloneuflattenuassertEqualugetvalue(uselfunumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu8length_as_max_line_length_with_refold_none_does_not_foldls
uJTestGeneratorBase.length_as_max_line_length_with_refold_none_does_not_foldcCs�|j|j|jd��}|j�}|j|d|jjddd|��}|j|�|j|j	�|j|j
|��dS(Niupolicyu
refold_sourceuallumax_line_length(umsgmakerutypurefold_long_expecteduioclassugenclassupolicyucloneuflattenuassertEqualugetvalueurefold_all_expected(uselfunumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu/length_as_max_line_length_with_refold_all_foldsts
uATestGeneratorBase.length_as_max_line_length_with_refold_all_foldscCsxd}|}|j|j|��}|j�}|j|dtj�}|j|�|j|j�|j|��dS(NuSubject: test

test body
upolicy(	umsgmakerutypuioclassugenclassupolicyuSMTPuflattenuassertEqualugetvalue(uselfusourceuexpectedumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyutest_crlf_control_via_policy|s
u.TestGeneratorBase.test_crlf_control_via_policycCs~d}|}|j|j|��}|j�}|j|dtj�}|j|dd�|j|j�|j|��dS(NuSubject: test

test body
upolicyulinesepu
(	umsgmakerutypuioclassugenclassupolicyuSMTPuflattenuassertEqualugetvalue(uselfusourceuexpectedumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu%test_flatten_linesep_overrides_policy�su7TestGeneratorBase.test_flatten_linesep_overrides_policyN(u__name__u
__module__u__qualname__upolicyudefaultuNoneumsgmakerutextwrapudedenturefold_long_expecteducopyurefold_all_expectedu
length_paramsu length_as_maxheaderlen_parameteru length_as_max_line_length_policyu,length_as_maxheaderlen_parm_overrides_policyu8length_as_max_line_length_with_refold_none_does_not_foldu/length_as_max_line_length_with_refold_all_foldsutest_crlf_control_via_policyu%test_flatten_linesep_overrides_policy(u
__locals__((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyuTestGeneratorBase
s*	



	
		uTestGeneratorBasecBs5|EeZdZee�ZeZej	Z
eZdS(u
TestGeneratorN(
u__name__u
__module__u__qualname__ustaticmethodumessage_from_stringumsgfuncu	GeneratorugenclassuiouStringIOuioclassustrutyp(u
__locals__((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu
TestGenerator�s	u
TestGeneratorcBsS|EeZdZee�ZeZej	Z
dd�Zdd�Zdd�Z
dS(uTestBytesGeneratorcCs
|jd�S(Nuascii(uencode(uselfux((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu<lambda>�suTestBytesGenerator.<lambda>cCs~djd�}djd�}t|�}tj�}t|d|jjdd��}|j|�|j|j	�|�dS(Nu5Subject: Maintenant je vous présente mon collègue

uutf-8uPSubject: Maintenant je vous =?unknown-8bit?q?pr=C3=A9sente_mon_coll=C3=A8gue?=

uasciiupolicyucte_typeu7bit(
uencodeumessage_from_bytesuiouBytesIOuBytesGeneratorupolicyucloneuflattenuassertEqualugetvalue(uselfusourceuexpectedumsgusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu'test_cte_type_7bit_handles_unknown_8bit�s		!
u:TestBytesGenerator.test_cte_type_7bit_handles_unknown_8bitcCs�tjd�jd�}t|�}tjd�jd�}tj�}t|d|jjdddd	��}|j	|�|j
|j�|�dS(
Nu/            From: foo@bar.com
            To: Dinsdale
            Subject: Nudge nudge, wink, wink
            Mime-Version: 1.0
            Content-Type: text/plain; charset="latin-1"
            Content-Transfer-Encoding: 8bit

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

            oh l=E0 l=E0, know what I mean, know what I mean?
            uasciiupolicyucte_typeu7bitulinesepu
(utextwrapudedentuencodeumessage_from_bytesuiouBytesIOuBytesGeneratorupolicyucloneuflattenuassertEqualugetvalue(uselfusourceumsguexpectedusug((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu&test_cte_type_7bit_transforms_8bit_cte�s		
u9TestBytesGenerator.test_cte_type_7bit_transforms_8bit_cteN(u__name__u
__module__u__qualname__ustaticmethodumessage_from_bytesumsgfuncuBytesGeneratorugenclassuiouBytesIOuioclassutypu'test_cte_type_7bit_handles_unknown_8bitu&test_cte_type_7bit_transforms_8bit_cte(u
__locals__((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyuTestBytesGenerator�s	uTestBytesGeneratoru__main__(uioutextwrapuunittestuemailumessage_from_stringumessage_from_bytesuemail.generatoru	GeneratoruBytesGeneratorupolicyutest.test_emailu
TestEmailBaseuparameterizeuTestGeneratorBaseu
TestGeneratoruTestBytesGeneratoru__name__umain(((uC/opt/alt/python33/lib64/python3.3/test/test_email/test_generator.pyu<module>s�/