+
    Df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ll))+  !((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ll))+  !((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ll))+  !((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'-17U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
 ll))+  !((7*;!<=d%9:f'?@i*UV))+,#//1&+Ah&:&:&<gu%%!..1K!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}u7Lh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
>10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   