+
    üÐj¾  ã                  ó”   € ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
HtHt ^ RIHt ^ RIHt  ! R R	]P"                  4      tR# )
é    )ÚannotationsN)ÚMessage)ÚBytesIOÚStringIO)ÚIOÚAnyStrÚCallable)Úbounce)Úunittestc                  óV   € ] tR t^tRtR R ltR R ltR R ltR R	 ltR
 R lt	Rt
R# )ÚBounceTestsz
Bounce message generation
c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "Ú?/usr/lib/python3/dist-packages/twisted/mail/test/test_bounce.pyÚ__annotate__ÚBounceTests.__annotate__   s   € ÷ Wñ W¨4ñ Wó    c                óº  € \         P                  ! \        R4      RR4      w  rpV P                  VR4       V P                  VR4       \        P
                  P                  4       pVP                  \        VP                  R4      4      4      pV P                  VR,          R4       V P                  VR,          R	4       V P                  VR
,          R4       R# )z>
L{twisted.mail.bounce.generateBounce} can accept L{unicode}.
zRFrom: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test

úmoshez@example.comúnonexistent@example.orgr   ó   moshez@example.comúutf-8ÚToÚFromúpostmaster@example.orgÚsubjectú)Returned Mail: see transcript for detailsN)	r
   ÚgenerateBouncer   ÚassertEqualÚemailÚparserÚParserÚparseÚdecode©ÚselfÚfromAddressÚtoÚsÚemailParserÚmesss   &     r   Útest_bounceMessageUnicodeÚ%BounceTests.test_bounceMessageUnicode   sÀ   € ô $×2Ò2Üðóð !Ø%ó
Ñˆ˜ð 	×Ñ˜ cÔ*Ø×Ñ˜Ð2Ô3Ü—l‘l×)Ñ)Ó+ˆØ× Ñ ¤¨!¯(©(°7Ó*;Ó!<Ó=ˆØ×Ñ˜˜d�Ð%9Ô:Ø×Ñ˜˜f�Ð'?Ô@Ø×Ñ˜˜i�Ð*UÖVr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ,   s   € ÷ Wñ W¨ñ Wr   c                óº  € \         P                  ! \        R4      RR4      w  rpV P                  VR4       V P                  VR4       \        P
                  P                  4       pVP                  \        VP                  R4      4      4      pV P                  VR,          R4       V P                  VR,          R	4       V P                  VR
,          R4       R# )z<
L{twisted.mail.bounce.generateBounce} can accept L{bytes}.
óR   From: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test

r   ó   nonexistent@example.orgr   r   r   r   r   r    r!   r"   N)
r
   r#   r   r$   r%   r&   r'   r(   r   r)   r*   s   &     r   Útest_bounceMessageBytesÚ#BounceTests.test_bounceMessageBytes,   sÀ   € ô $×2Ò2Üðóð "Ø&ó
Ñˆ˜ð 	×Ñ˜ cÔ*Ø×Ñ˜Ð2Ô3Ü—l‘l×)Ñ)Ó+ˆØ× Ñ ¤¨!¯(©(°7Ó*;Ó!<Ó=ˆØ×Ñ˜˜d�Ð%9Ô:Ø×Ñ˜˜f�Ð'?Ô@Ø×Ñ˜˜i�Ð*UÖVr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   D   s   € ÷ 
ñ 
°Dñ 
r   c                óh  € \         P                  ! \        R4      RRR4      w  rpV P                  VR4       V P                  VR4       \        P
                  P                  4       pVP                  \        VP                  R4      4      4      pV P                  VR,          R4       V P                  VR	,          R
4       V P                  VR,          R4       V P                  VP                  4       4       VP                  4       pV P                  V^ ,          P                  4       R4       R# )zL
Pass a custom transcript message to L{twisted.mail.bounce.generateBounce}.
r5   r   r6   zCustom transcriptr   r   r   r   r   r    r!   r"   zCustom transcript
N)r
   r#   r   r$   r%   r&   r'   r(   r   r)   Ú
assertTrueÚis_multipartÚget_payload)r+   r,   r-   r.   r/   r0   Úpartss   &      r   Ú"test_bounceMessageCustomTranscriptÚ.BounceTests.test_bounceMessageCustomTranscriptD   s  € ô $×2Ò2Üðóð "Ø&Øó
Ñˆ˜ð 	×Ñ˜ cÔ*Ø×Ñ˜Ð2Ô3Ü—l‘l×)Ñ)Ó+ˆØ× Ñ ¤¨!¯(©(°7Ó*;Ó!<Ó=ˆØ×Ñ˜˜d�Ð%9Ô:Ø×Ñ˜˜f�Ð'?Ô@Ø×Ñ˜˜i�Ð*UÔVØ�‰˜×)Ñ)Ó+Ô,Ø#×/Ñ/Ó1ˆØ×ÑØ�!�H× Ñ Ó"Ø!ö	
r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úheaderr   ÚmessageÚioTypezCallable[[AnyStr], IO[AnyStr]]r   r   r   )r   s   "r   r   r   c   s,   € ÷ 1ñ 1Øð1Ø'-ð1Ø7Uð1à	ñ1r   c                ó¸  € \         P                  ! V! W,           4      RR4      w  rEp\        P                  P	                  4       pVP                  \        VP                  R4      4      4      pV P                  VR,          R4       V P                  VR,          R4       V P                  VR,          R4       V P                  VP                  4       4       VP                  4       p	V	^,          P                  4       p
\        V\        4      '       d   VP                  R4      pMTpV
^ ,          P                  4       pV P                  VR	,           V4       R
# )zE
Pass a really big message to L{twisted.mail.bounce.generateBounce}.
r   r   r   r   r   r    r!   r"   Ú
N)r
   r#   r%   r&   r'   r(   r   r)   r$   r;   r<   r=   Ú
isinstanceÚbytes)r+   rB   rC   rD   r,   r-   r.   r/   r0   r>   ÚinnerMessageÚmessageTextÚpls   &&&&         r   Ú_bounceBigMessageÚBounceTests._bounceBigMessagec   s  € ô $×2Ò2Ù�6Õ#Ó$Ð&:Ð<Uó
Ñˆ˜ô —l‘l×)Ñ)Ó+ˆØ× Ñ ¤¨!¯(©(°7Ó*;Ó!<Ó=ˆØ×Ñ˜˜d�Ð%9Ô:Ø×Ñ˜˜f�Ð'?Ô@Ø×Ñ˜˜i�Ð*UÔVØ�‰˜×)Ñ)Ó+Ô,Ø#×/Ñ/Ó1ˆØ&+¨A¥h×&:Ñ&:Ó&<ˆÜ�gœu×%Ò%Ø!Ÿ.™.¨Ó1‰Kà!ˆKØ˜q•/×-Ñ-Ó/ˆØ×Ñ˜˜d� KÖ0r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   {   s   € ÷ Xñ X tñ Xr   c                ó    € RpV P                  VRR,          \        4       V P                  VP                  R4      RR,          \        4       R# )zR
L{twisted.mail.bounce.generateBounce} with big L{unicode} and
L{bytes} messages.
r5   s
   Test test
i'  r   z
More test
N)rL   r   r)   r   )r+   rB   s   & r   Útest_bounceBigMessageÚ!BounceTests.test_bounceBigMessage{   sB   € ð
ˆð 	×Ñ˜v ~¸Õ'=¼wÔGØ×Ñ˜vŸ}™}¨WÓ5°}ÀuÕ7LÌhÖWr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r1   r7   r?   rL   rP   Ú__static_attributes__r   r   r   r   r      s)   † ñõWõ0Wõ0
õ>1÷0Xñ Xr   r   )Ú
__future__r   Úemail.messager%   Úemail.parserr   Úior   r   Útypingr   r   r	   Útwisted.mailr
   Útwisted.trialr   ÚTestCaser   r   r   r   Ú<module>r`      s8   ðõ #ã Û Ý !ß  ß 'Ñ 'å Ý "ôxX�(×#Ñ#ö xXr   