§
    Étºf'°  ã                   ó|  — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ dd
lmZmZmZmZ ddlmZ ddlmZ 	 ddlmZ eZdZddlmZ ddlm Z  n# e!$ r dZdZY nw xY wdZ" G d„ dej#        ¦  «        Z$ G d„ dej#        ¦  «        Z% G d„ dej#        ¦  «        Z& G d„ de'¦  «        Z( G d„ dej#        ¦  «        Z) G d„ dej#        ¦  «        Z* G d „ d!ej#        ¦  «        Z+ G d"„ d#ej#        ¦  «        Z, G d$„ d%ej-        ¦  «        Z. G d&„ d'ej#        ¦  «        Z/ G d(„ d)ej#        ¦  «        Z0 G d*„ d+¦  «        Z1 G d,„ d-ej2        ¦  «        Z3 G d.„ d/ej2        ¦  «        Z4 G d0„ d1ej#        ¦  «        Z5 G d2„ d3ej#        ¦  «        Z6 G d4„ d5ej#        ¦  «        Z7 G d6„ d7e¦  «        Z8dS )8z8
Tests for L{twisted.words.protocols.jabber.xmlstream}.
é    )ÚskipIf)ÚverifyObject)ÚdeferÚtask)ÚConnectionLost)ÚIProtocolFactory)Úfailure)Úproto_helpers)Úunittest)ÚerrorÚijabberÚjidÚ	xmlstream)Ú!GenericXmlStreamFactoryTestsMixin)Údomish)Ússl)FÚ )ÚClientTLSOptions)ÚCertificateOptionsN)TzSSL not availableúurn:ietf:params:xml:ns:xmpp-tlsc                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚHashPasswordTestsz.
    Tests for L{xmlstream.hashPassword}.
    c                 ó\   — t          j        dd¦  «        }|                      d|¦  «         dS )zS
        The sid and secret are concatenated to calculate sha1 hex digest.
        Ú12345ÚsecretÚ(99567ee91b2c7cabf607f10cb9f4a3634fa820e0N©r   ÚhashPasswordÚassertEqual©ÚselfÚhashs     úf/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/words/test/test_jabberxmlstream.pyÚ
test_basiczHashPasswordTests.test_basic)   s3   € õ Ô% g¨xÑ8Ô8ˆØ×ÒÐCÀTÑJÔJÐJÐJÐJó    c                 óT   — |                       t          t          j        dd¦  «         dS )zB
        The session identifier must be a unicode object.
        s   Â¹2345r   N©ÚassertRaisesÚ	TypeErrorr   r   ©r!   s    r#   Útest_sidNotUnicodez$HashPasswordTests.test_sidNotUnicode0   s'   € ð 	×Ò�)¥YÔ%;¸_ÈhÑWÔWÐWÐWÐWr%   c                 óT   — |                       t          t          j        dd¦  «         dS )z8
        The password must be a unicode object.
        r   s   secrÃ©tNr'   r*   s    r#   Útest_passwordNotUnicodez)HashPasswordTests.test_passwordNotUnicode6   s(   € ð 	×Ò�)¥YÔ%;¸WÐFVÑWÔWÐWÐWÐWr%   c                 ó\   — t          j        dd¦  «        }|                      d|¦  «         dS )z\
        The concatenated sid and password must be encoded to UTF-8 before hashing.
        r   u   secrÃ©tÚ(659bf88d8f8e179081f7f3b4a8e7d224652d2853Nr   r    s     r#   Útest_unicodeSecretz$HashPasswordTests.test_unicodeSecret<   s3   € õ Ô% g¨}Ñ=Ô=ˆØ×ÒÐCÀTÑJÔJÐJÐJÐJr%   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r$   r+   r-   r0   © r%   r#   r   r   $   sh   € € € € € ðð ðKð Kð KðXð Xð XðXð Xð XðKð Kð Kð Kð Kr%   r   c                   óZ   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ ZdS )ÚIQTestszG
    Tests both IQ and the associated IIQResponseTracker callback.
    c                 ó’  — t          j        d¦  «        }d|_        t          j        |¦  «        | _         t	          j        ¦   «         | _        | j        j        | j         _        | j          	                    t          j        ¦   «         ¦  «         | j                              d¦  «         t          j        | j         d¦  «        | _        d S )NÚ	otherhostÚtestnszm<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='testns' from='otherhost' version='1.0'>Úget)r   ÚConnectAuthenticatorÚ	namespaceÚ	XmlStreamr   ÚClockÚclockÚ	callLaterÚ
_callLaterÚmakeConnectionr
   ÚStringTransportÚdataReceivedÚIQÚiq)r!   Úauthenticators     r#   ÚsetUpzIQTests.setUpI   s¡   € Ý!Ô6°{ÑCÔCˆØ"*ˆÔÝ"Ô,¨]Ñ;Ô;ˆŒÝ”Z‘\”\ˆŒ
Ø$(¤JÔ$8ˆŒÔ!ØŒ×%Ò%¥mÔ&CÑ&EÔ&EÑFÔFÐFØŒ×#Ò#ð=ñ	
ô 	
ð 	
õ ”,˜tœ~¨uÑ5Ô5ˆŒˆˆr%   c                 óˆ   — |                       | j        d         d¦  «         |                      | j        d         ¦  «         d S )NÚtyper;   Úid)r   rG   Ú
assertTruer*   s    r#   Ú	testBasiczIQTests.testBasicV   s<   € Ø×Ò˜œ œ¨%Ñ0Ô0Ð0Ø�Š˜œ œÑ&Ô&Ð&Ð&Ð&r%   c                 ó4  — | j         j                             ¦   «          | j                             ¦   «          | j        d                              d¦  «        }|                      | j         j                             ¦   «         d|z   dz   d|z   dz   g¦  «         d S )NrL   zutf-8s   <iq type='get' id='s   '/>s   <iq id='s   ' type='get'/>)r   Ú	transportÚclearrG   ÚsendÚencodeÚassertInÚvalue)r!   ÚidBytess     r#   ÚtestSendzIQTests.testSendZ   s•   € ØŒÔ ×&Ò&Ñ(Ô(Ð(ØŒ�Š‰ŒˆØ”'˜$”-×&Ò& wÑ/Ô/ˆØ�ŠØŒNÔ$×*Ò*Ñ,Ô,à&¨Ñ0°6Ñ9Ø˜gÑ%Ð(9Ñ9ðñ	
ô 	
ð 	
ð 	
ð 	
r%   c                 óÂ   ‡ — ˆ fd„}‰ j                              ¦   «         }|                     |¦  «         ‰ j        }|                     d‰ j         d         z  ¦  «         |S )Nc                 ó@   •— ‰                      | d         d¦  «         d S )NrK   Úresult)r   )rZ   r!   s    €r#   Úcbz&IQTests.testResultResponse.<locals>.cbg   s#   ø€ Ø×Ò˜V Fœ^¨XÑ6Ô6Ð6Ð6Ð6r%   ú<iq type='result' id='%s'/>rL   )rG   rR   ÚaddCallbackr   rE   )r!   r[   ÚdÚxss   `   r#   ÚtestResultResponsezIQTests.testResultResponsef   si   ø€ ð	7ð 	7ð 	7ð 	7ð 	7ð ŒG�LŠL‰NŒNˆØ	�Š�bÑÔÐàŒ^ˆØ
�ŠÐ5¸¼À¼ÑEÑFÔFÐFØˆr%   c                 óÌ   — | j                              ¦   «         }|                      |t          j        ¦  «         | j        }|                     d| j         d         z  ¦  «         |S )Nz<iq type='error' id='%s'/>rL   )rG   rR   ÚassertFailurer   ÚStanzaErrorr   rE   ©r!   r^   r_   s      r#   ÚtestErrorResponsezIQTests.testErrorResponseq   sT   € ØŒG�LŠL‰NŒNˆØ×Ò˜1�eÔ/Ñ0Ô0Ð0àŒ^ˆØ
�ŠÐ4°t´w¸t´}ÑDÑEÔEÐEØˆr%   c                 óÔ   ‡ — ‰ j         }t          j        |¦  «         ‰                      |j        ¦  «         ˆ fd„}|                     d|d¦  «         |                     d¦  «         dS )zÇ
        Test that untracked iq responses don't trigger any action.

        Untracked means that the id of the incoming response iq is not
        in the stream's C{iqDeferreds} dictionary.
        c                 óP   •— ‰                      t          | dd¦  «        ¦  «         d S )NÚhandledF)ÚassertFalseÚgetattr)rG   r!   s    €r#   r[   z*IQTests.testNonTrackedResponse.<locals>.cb‰   s)   ø€ Ø×Ò�W R¨°EÑ:Ô:Ñ;Ô;Ð;Ð;Ð;r%   z/iqéÿÿÿÿz<iq type='result' id='test'/>N)r   ÚupgradeWithIQResponseTrackerri   ÚiqDeferredsÚaddObserverrE   )r!   r_   r[   s   `  r#   ÚtestNonTrackedResponsezIQTests.testNonTrackedResponsey   s�   ø€ ð Œ^ˆÝÔ.¨rÑ2Ô2Ð2ð 	×Ò˜œÑ(Ô(Ð(ð
	<ð 	<ð 	<ð 	<ð 	<ð 	�Š�u˜b "Ñ%Ô%Ð%ð 	�ŠÐ7Ñ8Ô8Ð8Ð8Ð8r%   c                 óØ   — | j                              ¦   «         }| j        }|                     d| j         d         z  ¦  «         |                      | j         d         |j        ¦  «         |S )z¦
        Test if the deferred associated with an iq request is removed
        from the list kept in the L{XmlStream} object after it has
        been fired.
        r\   rL   )rG   rR   r   rE   ÚassertNotInrm   rd   s      r#   ÚtestCleanupzIQTests.testCleanup‘   s[   € ð ŒG�LŠL‰NŒNˆØŒ^ˆØ
�ŠÐ5¸¼À¼ÑEÑFÔFÐFØ×Ò˜œ œ¨¬Ñ7Ô7Ð7Øˆr%   c                 ó¦   — | j                              ¦   «         }| j        }|                     d¦  «         |                      |t
          ¦  «         |S )z‰
        Test if deferreds for iq's that haven't yet received a response
        have their errback called on stream disconnect.
        úClosed by peer)rG   rR   r   ÚconnectionLostrb   r   rd   s      r#   ÚtestDisconnectCleanupzIQTests.testDisconnectCleanupž   sJ   € ð ŒG�LŠL‰NŒNˆØŒ^ˆØ
×ÒÐ*Ñ+Ô+Ð+Ø×Ò˜1�nÑ-Ô-Ð-Øˆr%   c                 ó¦   ‡ ‡— ˆˆ fd„Š‰ j                              ¦   «         }|                     ‰¦  «         ‰ j                             d¦  «         |S )z~
        Test to make sure the errbacks cannot cause the iteration of the
        iqDeferreds to blow up in our face.
        c                 óˆ   •— t          j        ‰j         ¦  «                             ¦   «         }|                     ‰¦  «         d S ©N)r   rF   rR   Ú
addErrback)r	   r^   Úebr!   s     €€r#   r{   z'IQTests.testNoModifyingDict.<locals>.eb°   s8   ø€ Ý”˜Tœ^Ñ,Ô,×1Ò1Ñ3Ô3ˆAØ�LŠL˜ÑÔÐÐÐr%   rt   )rG   rR   rz   r   ru   )r!   r^   r{   s   ` @r#   ÚtestNoModifyingDictzIQTests.testNoModifyingDictª   sa   øø€ ð	ð 	ð 	ð 	ð 	ð 	ð ŒG�LŠL‰NŒNˆØ	�Š�RÑÔÐØŒ×%Ò%Ð&6Ñ7Ô7Ð7Øˆr%   c                 óD  — d| j         _        | j                              ¦   «         }|                      |t          j        ¦  «         | j                             ddg¦  «         |                      | j        j	        ¦  «         |                      | j        j
        ¦  «         |S )zK
        Test that an iq request with a defined timeout times out.
        é<   é   )rG   ÚtimeoutrR   rb   r   ÚTimeoutErrorr@   Úpumpri   Úcallsrm   ©r!   r^   s     r#   ÚtestRequestTimingOutzIQTests.testRequestTimingOut¹   s„   € ð ˆŒŒØŒG�LŠL‰NŒNˆØ×Ò˜1�iÔ4Ñ5Ô5Ð5àŒ
�Š˜˜B˜Ñ Ô Ð Ø×Ò˜œÔ)Ñ*Ô*Ð*Ø×Ò˜œÔ3Ñ4Ô4Ð4Øˆr%   c                 ó.  — d| j         _        | j                              ¦   «         }| j                             d| j        j        d| j         d         z  ¦  «         | j                             ddg¦  «         |                      | j        j	        ¦  «         |S )zš
        Test that an iq request with a defined timeout does not time out
        when a response was received before the timeout period elapsed.
        r~   r   r\   rL   )
rG   r€   rR   r@   rA   r   rE   r‚   ri   rƒ   r„   s     r#   ÚtestRequestNotTimingOutzIQTests.testRequestNotTimingOutÆ   s‡   € ð
 ˆŒŒØŒG�LŠL‰NŒNˆØŒ
×ÒØØŒNÔ'Ø)¨D¬G°D¬MÑ9ñ	
ô 	
ð 	
ð
 	Œ
�Š˜˜A˜ÑÔÐØ×Ò˜œÔ)Ñ*Ô*Ð*Øˆr%   c                 óü   — d| j         _        | j                              ¦   «         }| j        }|                     d¦  «         |                      |t          ¦  «         |                      | j        j	        ¦  «         |S )z|
        Test if timeouts for iq's that haven't yet received a response
        are cancelled on stream disconnect.
        r~   rt   )
rG   r€   rR   r   ru   rb   r   ri   r@   rƒ   rd   s      r#   Ú!testDisconnectTimeoutCancellationz)IQTests.testDisconnectTimeoutCancellationÖ   sl   € ð ˆŒŒØŒG�LŠL‰NŒNˆàŒ^ˆØ
×ÒÐ*Ñ+Ô+Ð+Ø×Ò˜1�nÑ-Ô-Ð-Ø×Ò˜œÔ)Ñ*Ô*Ð*Øˆr%   N)r1   r2   r3   r4   rI   rN   rW   r`   re   ro   rr   rv   r|   r…   r‡   r‰   r5   r%   r#   r7   r7   D   sÒ   € € € € € ðð ð6ð 6ð 6ð'ð 'ð 'ð

ð 

ð 

ð	ð 	ð 	ðð ð ð9ð 9ð 9ð0ð ð ð
ð 
ð 
ðð ð ðð ð ðð ð ð ð ð ð ð r%   r7   c                   ón   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚXmlStreamTestsc                 ó   — d| _         d S ©NT)ÚgotStreamStart©r!   Úobjs     r#   ÚonStreamStartzXmlStreamTests.onStreamStartç   ó   € Ø"ˆÔÐÐr%   c                 ó   — d| _         d S r�   )ÚgotStreamEndr�   s     r#   ÚonStreamEndzXmlStreamTests.onStreamEndê   s   € Ø ˆÔÐÐr%   c                 ó   — d| _         d S r�   )ÚgotStreamErrorr�   s     r#   ÚonStreamErrorzXmlStreamTests.onStreamErrorí   r’   r%   c                 óª  — d| _         d| _        d| _        t          j        t          j        ¦   «         ¦  «        }|                     d| j        ¦  «         |                     d| j        ¦  «         |                     d| j	        ¦  «         | 
                    t          j        ¦   «         ¦  «         ||j        _        d|_        d|_        || _        dS )z9
        Set up XmlStream and several observers.
        Fz//event/stream/startú//event/stream/endz//event/stream/errorr:   ©r   r   N)rŽ   r”   r—   r   r>   ÚAuthenticatorrn   r‘   r•   r˜   rC   r
   Ú StringTransportWithDisconnectionrP   Úprotocolr=   Úversion©r!   r_   s     r#   rI   zXmlStreamTests.setUpð   s½   € ð $ˆÔØ!ˆÔØ#ˆÔÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�ŠÐ-¨tÔ/AÑBÔBÐBØ
�ŠÐ+¨TÔ-=Ñ>Ô>Ð>Ø
�ŠÐ-¨tÔ/AÑBÔBÐBØ
×Ò�-ÔHÑJÔJÑKÔKÐKØ "ˆŒÔØˆŒØˆŒ
ØˆŒˆˆr%   c                 ó’  — | j         }|                     ¦   «          | j         j                             ¦   «         dd…                              d¦  «        }|                      d|¦  «         |                      d|¦  «         |                      d|¦  «         |                      d|¦  «         |                      |j        ¦  «         dS )	z>
        Basic test on the header sent by sendHeader.
        r   rk   ó    ó   <stream:streamó/   xmlns:stream='http://etherx.jabber.org/streams'ó   xmlns='testns'ó   version='1.0'N)r   Ú
sendHeaderrP   rU   ÚsplitrT   rM   Ú_headerSent©r!   r_   ÚsplitHeaders      r#   Útest_sendHeaderBasicz#XmlStreamTests.test_sendHeaderBasic  s³   € ð Œ^ˆØ
�Š‰ŒˆØ”nÔ.×4Ò4Ñ6Ô6°q¸°tÔ<×BÒBÀ4ÑHÔHˆØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐHÈ+ÑVÔVÐVØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐ&¨Ñ4Ô4Ð4Ø�Š˜œÑ'Ô'Ð'Ð'Ð'r%   c                 óÒ  — | j         }d|j        d<   |                     ¦   «          | j         j                             ¦   «         dd…                              d¦  «        }|                      d|¦  «         |                      d|¦  «         |                      d|¦  «         |                      d	|¦  «         |                      d
|¦  «         |                      |j        ¦  «         dS )z=
        Test for additional namespace declarations.
        Údbzjabber:server:dialbackr   rk   r¢   r£   r¤   s!   xmlns:db='jabber:server:dialback'r¥   r¦   N)	r   Úprefixesr§   rP   rU   r¨   rT   rM   r©   rª   s      r#   Ú#test_sendHeaderAdditionalNamespacesz2XmlStreamTests.test_sendHeaderAdditionalNamespaces  sÕ   € ð Œ^ˆØ04ˆŒÐ,Ñ-Ø
�Š‰ŒˆØ”nÔ.×4Ò4Ñ6Ô6°q¸°tÔ<×BÒBÀ4ÑHÔHˆØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐHÈ+ÑVÔVÐVØ�ŠÐ:¸KÑHÔHÐHØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐ&¨Ñ4Ô4Ð4Ø�Š˜œÑ'Ô'Ð'Ð'Ð'r%   c                 ón  — | j         }t          j        d¦  «        |_        t          j        d¦  «        |_        d|_        |                     ¦   «          |j                             ¦   «         dd…          	                    d¦  «        }|  
                    d|¦  «         |  
                    d|¦  «         d	S )
z;
        Test addressing when initiating a stream.
        ÚthisHostÚ	otherHostTr   rk   r¢   ó   to='otherhost'ó   from='thishost'N)r   r   ÚJIDÚ
thisEntityÚotherEntityÚ
initiatingr§   rP   rU   r¨   rT   rª   s      r#   Útest_sendHeaderInitiatingz(XmlStreamTests.test_sendHeaderInitiating  s›   € ð Œ^ˆÝœ 
Ñ+Ô+ˆŒÝœ Ñ-Ô-ˆŒØˆŒØ
�Š‰ŒˆØ”l×(Ò(Ñ*Ô*¨1¨R¨4Ô0×6Ò6°tÑ<Ô<ˆØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐ(¨+Ñ6Ô6Ð6Ð6Ð6r%   c                 ó¨  — | j         }t          j        d¦  «        |_        t          j        d¦  «        |_        d|_        d|_        |                     ¦   «          |j         	                    ¦   «         dd…          
                    d¦  «        }|                      d|¦  «         |                      d	|¦  «         |                      d
|¦  «         dS )z:
        Test addressing when receiving a stream.
        r²   r³   FÚ	session01r   rk   r¢   r´   rµ   s   id='session01'N)r   r   r¶   r·   r¸   r¹   Úsidr§   rP   rU   r¨   rT   rª   s      r#   Útest_sendHeaderReceivingz'XmlStreamTests.test_sendHeaderReceiving*  s·   € ð Œ^ˆÝœ 
Ñ+Ô+ˆŒÝœ Ñ-Ô-ˆŒØˆŒØˆŒØ
�Š‰ŒˆØ”l×(Ò(Ñ*Ô*¨1¨R¨4Ô0×6Ò6°tÑ<Ô<ˆØ�ŠÐ'¨Ñ5Ô5Ð5Ø�ŠÐ(¨+Ñ6Ô6Ð6Ø�ŠÐ'¨Ñ5Ô5Ð5Ð5Ð5r%   c                 óÐ   — | j         }|                     d¦  «         |                     d¦  «         |                      | j        ¦  «         |                      | j        ¦  «         dS )z>
        Test events when a stream error is received.
        ú�<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345' version='1.0'>z<stream:error/>N)r   rE   rM   r—   r”   r    s     r#   Útest_receiveStreamErrorz&XmlStreamTests.test_receiveStreamError9  sk   € ð Œ^ˆØ
�Šð;ñ	
ô 	
ð 	
ð
 	�ŠÐ)Ñ*Ô*Ð*Ø�Š˜Ô+Ñ,Ô,Ð,Ø�Š˜Ô)Ñ*Ô*Ð*Ð*Ð*r%   c                 óX  — | j         }d|_        |                     ¦   «          |j                             ¦   «          |                     t          j        d¦  «        ¦  «         |                      d|j         	                    ¦   «         ¦  «         |  
                    | j        ¦  «         dS )z“
        Test sendStreamError on an initiating xmlstream with a header sent.

        An error should be sent out and the connection lost.
        Túversion-unsupportedr%   N©r   r¹   r§   rP   rQ   ÚsendStreamErrorr   ÚStreamErrorÚassertNotEqualrU   rM   r”   r    s     r#   Útest_sendStreamErrorInitiatingz-XmlStreamTests.test_sendStreamErrorInitiatingG  s’   € ð Œ^ˆØˆŒØ
�Š‰ŒˆØ
Œ×ÒÑÔÐØ
×Ò�5Ô,Ð-BÑCÔCÑDÔDÐDØ×Ò˜C ¤×!3Ò!3Ñ!5Ô!5Ñ6Ô6Ð6Ø�Š˜Ô)Ñ*Ô*Ð*Ð*Ð*r%   c                 ód  — | j         }d|_        |j                             ¦   «          |                     t          j        d¦  «        ¦  «         |                      |j        ¦  «         |  	                    d|j         
                    ¦   «         ¦  «         |                      | j        ¦  «         dS )zø
        Test sendStreamError on an initiating xmlstream without having sent a
        header.

        In this case, no header should be generated. Also, the error should
        not be sent out on the stream. Just closing the connection.
        TrÃ   r%   N)r   r¹   rP   rQ   rÅ   r   rÆ   Ú	assertNotr©   r   rU   rM   r”   r    s     r#   Ú&test_sendStreamErrorInitiatingNoHeaderz5XmlStreamTests.test_sendStreamErrorInitiatingNoHeaderU  s™   € ð Œ^ˆØˆŒØ
Œ×ÒÑÔÐØ
×Ò�5Ô,Ð-BÑCÔCÑDÔDÐDØ�Š�r”~Ñ&Ô&Ð&Ø×Ò˜˜bœl×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ø�Š˜Ô)Ñ*Ô*Ð*Ð*Ð*r%   c                 óX  — | j         }d|_        |                     ¦   «          |j                             ¦   «          |                     t          j        d¦  «        ¦  «         |                      d|j         	                    ¦   «         ¦  «         |  
                    | j        ¦  «         dS )z‘
        Test sendStreamError on a receiving xmlstream with a header sent.

        An error should be sent out and the connection lost.
        FrÃ   r%   NrÄ   r    s     r#   Útest_sendStreamErrorReceivingz,XmlStreamTests.test_sendStreamErrorReceivinge  s’   € ð Œ^ˆØˆŒØ
�Š‰ŒˆØ
Œ×ÒÑÔÐØ
×Ò�5Ô,Ð-BÑCÔCÑDÔDÐDØ×Ò˜C ¤×!3Ò!3Ñ!5Ô!5Ñ6Ô6Ð6Ø�Š˜Ô)Ñ*Ô*Ð*Ð*Ð*r%   c                 ód  — | j         }d|_        |j                             ¦   «          |                     t          j        d¦  «        ¦  «         |                      |j        ¦  «         |  	                    d|j         
                    ¦   «         ¦  «         |                      | j        ¦  «         dS )z÷
        Test sendStreamError on a receiving xmlstream without having sent a
        header.

        In this case, a header should be generated. Then, the error should
        be sent out on the stream followed by closing the connection.
        FrÃ   r%   N)r   r¹   rP   rQ   rÅ   r   rÆ   rM   r©   rÇ   rU   r”   r    s     r#   Ú%test_sendStreamErrorReceivingNoHeaderz4XmlStreamTests.test_sendStreamErrorReceivingNoHeaders  s™   € ð Œ^ˆØˆŒØ
Œ×ÒÑÔÐØ
×Ò�5Ô,Ð-BÑCÔCÑDÔDÐDØ�Š˜œÑ'Ô'Ð'Ø×Ò˜C ¤×!3Ò!3Ñ!5Ô!5Ñ6Ô6Ð6Ø�Š˜Ô)Ñ*Ô*Ð*Ð*Ð*r%   c                 óÜ   — | j         }|                     ¦   «          |j        }|                     ¦   «          |                      ||j        ¦  «         |                      |j        ¦  «         dS )zE
        Test resetting the XML stream to start a new layer.
        N)r   r§   ÚstreamÚresetrÇ   rÊ   r©   )r!   r_   rÑ   s      r#   Ú
test_resetzXmlStreamTests.test_resetƒ  s^   € ð Œ^ˆØ
�Š‰ŒˆØ”ˆØ
�Š‰
Œ
ˆ
Ø×Ò˜F B¤IÑ.Ô.Ð.Ø�Š�r”~Ñ&Ô&Ð&Ð&Ð&r%   c                 óT  — | j         }|                     d¦  «         |                      |j                             ¦   «         d¦  «         |j                             ¦   «          t          j        d¦  «        }|                     |¦  «         |                      |j                             ¦   «         d¦  «         |j                             ¦   «          t          j        d¦  «        }|                     |¦  «         |                      |j                             ¦   «         d¦  «         dS )z:
        Test send with various types of objects.
        ú<presence/>ó   <presence/>)r:   Úpresence)z http://etherx.jabber.org/streamsÚfeaturess   <stream:features/>N)r   rR   r   rP   rU   rQ   r   ÚElement)r!   r_   Úels      r#   Ú	test_sendzXmlStreamTests.test_sendŽ  sö   € ð Œ^ˆØ
�Š�ÑÔÐØ×Ò˜œ×+Ò+Ñ-Ô-¨~Ñ>Ô>Ð>à
Œ×ÒÑÔÐÝŒ^Ð2Ñ3Ô3ˆØ
�Š�‰ŒˆØ×Ò˜œ×+Ò+Ñ-Ô-¨~Ñ>Ô>Ð>à
Œ×ÒÑÔÐÝŒ^ÐLÑMÔMˆØ
�Š�‰ŒˆØ×Ò˜œ×+Ò+Ñ-Ô-Ð/DÑEÔEÐEÐEÐEr%   c                 óÀ  ‡‡‡— g Šg Šg Š G ˆˆˆfd„d¦  «        } |¦   «         }t          j        |¦  «        }|                      |g‰¦  «         |                     ¦   «          |                      dg‰¦  «         |                     d¦  «         |                      dt          ‰¦  «        ¦  «         |                     ¦   «          |                      dg‰¦  «         dS )zM
        Test that the associated authenticator is correctly called.
        c                   ó.   •— e Zd Zˆfd„Zˆfd„Zˆ fd„ZdS )ú<XmlStreamTests.test_authenticator.<locals>.TestAuthenticatorc                 ó2   •— ‰                      d ¦  «         d S ry   ©Úappend)r!   ÚconnectionMadeCallss    €r#   ÚconnectionMadezKXmlStreamTests.test_authenticator.<locals>.TestAuthenticator.connectionMade©  s   ø€ Ø#×*Ò*¨4Ñ0Ô0Ð0Ð0Ð0r%   c                 ó2   •— ‰                      |¦  «         d S ry   rà   )r!   ÚrootElementÚstreamStartedCallss     €r#   ÚstreamStartedzJXmlStreamTests.test_authenticator.<locals>.TestAuthenticator.streamStarted¬  s   ø€ Ø"×)Ò)¨+Ñ6Ô6Ð6Ð6Ð6r%   c                 ó2   •— ‰                      |¦  «         d S ry   rà   )r!   r_   ÚassociateWithStreamCallss     €r#   ÚassociateWithStreamzPXmlStreamTests.test_authenticator.<locals>.TestAuthenticator.associateWithStream¯  s   ø€ Ø(×/Ò/°Ñ3Ô3Ð3Ð3Ð3r%   N)r1   r2   r3   rã   rç   rê   )ré   râ   ræ   s   €€€r#   ÚTestAuthenticatorrÞ   ¨  s`   ø€ € € € € ð1ð 1ð 1ð 1ð 1ð7ð 7ð 7ð 7ð 7ð4ð 4ð 4ð 4ð 4ð 4ð 4r%   rë   Nús<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345'>r   )r   r>   r   rã   rE   ÚlenrÒ   )r!   rë   Úar_   ré   râ   ræ   s       @@@r#   Útest_authenticatorz!XmlStreamTests.test_authenticator   s!  øøø€ ð !ÐØÐØ#%Ð ð	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4ñ 	4ô 	4ð 	4ð ÐÑÔˆÝÔ  Ñ#Ô#ˆØ×Ò˜"˜Ð7Ñ8Ô8Ð8Ø
×ÒÑÔÐØ×Ò˜$˜Ð!4Ñ5Ô5Ð5Ø
�Šð-ñ	
ô 	
ð 	
ð
 	×Ò˜�CÐ 2Ñ3Ô3Ñ4Ô4Ð4Ø
�Š‰
Œ
ˆ
Ø×Ò˜$˜Ð!4Ñ5Ô5Ð5Ð5Ð5r%   N)r1   r2   r3   r‘   r•   r˜   rI   r¬   r°   rº   r¾   rÁ   rÈ   rË   rÍ   rÏ   rÓ   rÛ   rï   r5   r%   r#   r‹   r‹   æ   s  € € € € € ð#ð #ð #ð!ð !ð !ð#ð #ð #ðð ð ð"(ð (ð (ð(ð (ð (ð7ð 7ð 7ð6ð 6ð 6ð+ð +ð +ð+ð +ð +ð+ð +ð +ð +ð +ð +ð+ð +ð +ð 	'ð 	'ð 	'ðFð Fð Fð$6ð 6ð 6ð 6ð 6r%   r‹   c                   ó   — e Zd ZdS )Ú	TestErrorN)r1   r2   r3   r5   r%   r#   rñ   rñ   Á  s   € € € € € Ø€Dr%   rñ   c                   ó,   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚAuthenticatorTestsc                 ór   — t          j        ¦   «         | _        t          j        | j        ¦  «        | _         d S ry   )r   rœ   rH   r>   r*   s    r#   rI   zAuthenticatorTests.setUpÆ  s,   € Ý&Ô4Ñ6Ô6ˆÔÝ"Ô,¨TÔ-?Ñ@Ô@ˆŒˆˆr%   c                 ó˜  — | j         }|                     t          j        ¦   «         ¦  «         |                     d¦  «         |                      d|j        ¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         |                      d|j        ¦  «         dS )úe
        Test streamStart to fill the appropriate attributes from the
        stream header.
        ú’<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.org' to='example.com' id='12345' version='1.0'>r›   NÚinvalid)r   rC   r
   rD   rE   r   rŸ   ÚassertIdenticalr½   r=   r¸   r·   r    s     r#   Útest_streamStartz#AuthenticatorTests.test_streamStartÊ  sÃ   € ð
 Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šðñ	
ô 	
ð 	
ð 	×Ò˜ ¤Ñ,Ô,Ð,Ø×Ò˜T 2¤6Ñ*Ô*Ð*Ø×Ò˜ B¤LÑ1Ô1Ð1Ø×Ò˜T 2¤>Ñ2Ô2Ð2Ø×Ò˜˜rœ}Ñ-Ô-Ð-Ð-Ð-r%   c                 óÀ   — | j         }|                     t          j        ¦   «         ¦  «         |                     d¦  «         |                      d|j        ¦  «         dS )z
        Test streamStart to fill the appropriate attributes from the
        stream header for a pre-XMPP-1.0 header.
        rì   ©r   r   N©r   rC   r
   rD   rE   r   rŸ   r    s     r#   Útest_streamStartLegacyz)AuthenticatorTests.test_streamStartLegacyÝ  sc   € ð
 Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šð-ñ	
ô 	
ð 	
ð
 	×Ò˜ ¤Ñ,Ô,Ð,Ð,Ð,r%   c                 óÀ   — | j         }|                     t          j        ¦   «         ¦  «         |                     d¦  «         |                      d|j        ¦  «         dS )z‡
        Test streamStart to fill the appropriate attributes from the
        stream header for a version with only one digit.
        z<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345' version='1'>rü   Nrý   r    s     r#   Útest_streamBadVersionOneDigitz0AuthenticatorTests.test_streamBadVersionOneDigitë  sc   € ð
 Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šð9ñ	
ô 	
ð 	
ð
 	×Ò˜ ¤Ñ,Ô,Ð,Ð,Ð,r%   c                 óÀ   — | j         }|                     t          j        ¦   «         ¦  «         |                     d¦  «         |                      d|j        ¦  «         dS )z}
        Test streamStart to fill the appropriate attributes from the
        stream header for a malformed version.
        z‚<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345' version='blah'>rü   Nrý   r    s     r#   Útest_streamBadVersionNoNumberz0AuthenticatorTests.test_streamBadVersionNoNumberù  sc   € ð
 Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šð<ñ	
ô 	
ð 	
ð
 	×Ò˜ ¤Ñ,Ô,Ð,Ð,Ð,r%   N)r1   r2   r3   rI   rú   rþ   r   r  r5   r%   r#   ró   ró   Å  sb   € € € € € ðAð Að Að.ð .ð .ð&-ð -ð -ð-ð -ð -ð-ð -ð -ð -ð -r%   ró   c                   ó2   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚConnectAuthenticatorTestsc                 ó  — d| _         d | _        t          j        d¦  «        | _        t          j        | j        ¦  «        | _        | j                             d| j        ¦  «         | j                             d| j        ¦  «         d S )NFr³   ú//event/stream/authdú//event/xmpp/initfailed)	ÚgotAuthenticatedÚinitFailurer   r<   rH   r>   rn   ÚonAuthenticatedÚonInitFailedr*   s    r#   rI   zConnectAuthenticatorTests.setUp	  sx   € Ø %ˆÔØˆÔÝ&Ô;¸KÑHÔHˆÔÝ"Ô,¨TÔ-?Ñ@Ô@ˆŒØŒ×"Ò"Ð#9¸4Ô;OÑPÔPÐPØŒ×"Ò"Ð#<¸dÔ>OÑPÔPÐPÐPÐPr%   c                 ó   — d| _         d S r�   )r  r�   s     r#   r
  z)ConnectAuthenticatorTests.onAuthenticated  s   € Ø $ˆÔÐÐr%   c                 ó   — || _         d S ry   )r	  )r!   r	   s     r#   r  z&ConnectAuthenticatorTests.onInitFailed  s   € Ø"ˆÔÐÐr%   c                 óô   —  G d„ d¦  «        } |¦   «         }|g| j         _        | j                             ¦   «          |                      g | j         j        ¦  «         |                      | j        ¦  «         dS )zG
        Test successful completion of an initialization step.
        c                   ó   — e Zd Zd„ ZdS )ú9ConnectAuthenticatorTests.testSucces.<locals>.Initializerc                 ó   — d S ry   r5   r*   s    r#   Ú
initializezDConnectAuthenticatorTests.testSucces.<locals>.Initializer.initialize  s   € Ø�r%   N©r1   r2   r3   r  r5   r%   r#   ÚInitializerr    s#   € € € € € ðð ð ð ð r%   r  N)r   ÚinitializersrH   ÚinitializeStreamr   rM   r  ©r!   r  Úinits      r#   Ú
testSuccesz$ConnectAuthenticatorTests.testSucces  sŽ   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð ˆ{‰}Œ}ˆØ'+ fˆŒÔ#àÔ×+Ò+Ñ-Ô-Ð-Ø×Ò˜˜Tœ^Ô8Ñ9Ô9Ð9Ø�Š˜Ô-Ñ.Ô.Ð.Ð.Ð.r%   c                 ó�  —  G d„ d¦  «        } |¦   «         }|g| j         _        | j                             ¦   «          |                      |g| j         j        ¦  «         |                      | j        ¦  «         |                      d| j        ¦  «         |  	                    | j         
                    t          ¦  «        ¦  «         dS )z9
        Test failure of an initialization step.
        c                   ó   — e Zd Zd„ ZdS )ú:ConnectAuthenticatorTests.testFailure.<locals>.Initializerc                 ó   — t           ‚ry   )rñ   r*   s    r#   r  zEConnectAuthenticatorTests.testFailure.<locals>.Initializer.initialize-  s   € Ý�r%   Nr  r5   r%   r#   r  r  ,  s#   € € € € € ð ð  ð  ð  ð  r%   r  N)r   r  rH   r  r   ri   r  ÚassertNotIdenticalr	  rM   Úcheckrñ   r  s      r#   ÚtestFailurez%ConnectAuthenticatorTests.testFailure'  sÎ   € ð
	 ð 	 ð 	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð ˆ{‰}Œ}ˆØ'+ fˆŒÔ#àÔ×+Ò+Ñ-Ô-Ð-Ø×Ò˜$˜ ¤Ô!<Ñ=Ô=Ð=Ø×Ò˜Ô.Ñ/Ô/Ð/Ø×Ò  dÔ&6Ñ7Ô7Ð7Ø�Š˜Ô(×.Ò.­yÑ9Ô9Ñ:Ô:Ð:Ð:Ð:r%   c                 ó‚  — d| j         _        | j        }|                     t	          j        ¦   «         ¦  «         |                     d¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         |                      d|j        ¦  «         |                      d|j
        j        ¦  «         |                      d|j        ¦  «         |                      | j        ¦  «         |                     d¦  «         |                      d|j        ¦  «         |                      | j        ¦  «         dS )	rö   r:   z’<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' to='example.org' id='12345' version='1.0'>r›   r   úexample.comNz9<stream:features><test xmlns='testns'/></stream:features>©r:   Útest)rH   r=   r   rC   r
   rD   rE   r   rŸ   r½   r¸   Úhostrù   r·   rÊ   r  rT   rØ   rM   r    s     r#   rú   z*ConnectAuthenticatorTests.test_streamStart9  s-  € ð
 (0ˆÔÔ$ØŒ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šðñ	
ô 	
ð 	
ð 	×Ò˜ ¤Ñ,Ô,Ð,Ø×Ò˜ "¤&Ñ)Ô)Ð)Ø×Ò˜ 2¤<Ñ0Ô0Ð0Ø×Ò˜¨¬Ô(;Ñ<Ô<Ð<Ø×Ò˜T 2¤=Ñ1Ô1Ð1Ø�Š�tÔ,Ñ-Ô-Ð-Ø
�ŠØMñ	
ô 	
ð 	
ð 	�ŠÐ(¨"¬+Ñ6Ô6Ð6Ø�Š˜Ô-Ñ.Ô.Ð.Ð.Ð.r%   N)	r1   r2   r3   rI   r
  r  r  r   rú   r5   r%   r#   r  r    sq   € € € € € ðQð Qð Qð%ð %ð %ð#ð #ð #ð/ð /ð /ð ;ð ;ð ;ð$/ð /ð /ð /ð /r%   r  c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚListenAuthenticatorTestsz4
    Tests for L{xmlstream.ListenAuthenticator}
    c                 ór   — t          j        ¦   «         | _        t          j        | j        ¦  «        | _         d S ry   )r   ÚListenAuthenticatorrH   r>   r*   s    r#   rI   zListenAuthenticatorTests.setUpY  s,   € Ý&Ô:Ñ<Ô<ˆÔÝ"Ô,¨TÔ-?Ñ@Ô@ˆŒˆˆr%   c                 ó  — | j         }|                     t          j        ¦   «         ¦  «         |                      d|j        ¦  «         |                     d¦  «         |                      d|j        ¦  «         |  	                    d|j        ¦  «         |  
                    d|j        ¦  «         |                      d|j        ¦  «         |                      d|j        ¦  «         |                      d|j        j        ¦  «         dS )rö   Nr÷   r›   r   újabber:clientr"  )r   rC   r
   rD   rù   r½   rE   r   rŸ   r  rÇ   r=   r¸   r·   r%  r    s     r#   rú   z)ListenAuthenticatorTests.test_streamStart]  sö   € ð
 Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø×Ò˜T 2¤6Ñ*Ô*Ð*Ø
�Šðñ	
ô 	
ð 	
ð 	×Ò˜ ¤Ñ,Ô,Ð,Ø×Ò  b¤fÑ-Ô-Ð-Ø×Ò˜G R¤VÑ,Ô,Ð,Ø×Ò˜¨"¬,Ñ7Ô7Ð7Ø×Ò˜T 2¤>Ñ2Ô2Ð2Ø×Ò˜¨¬Ô(:Ñ;Ô;Ð;Ð;Ð;r%   c                 óÊ   — | j         }|                     t          j        ¦   «         ¦  «         |                     d¦  «         |                      |j        t          ¦  «         dS )zD
        The generated session id must be a unicode object.
        r÷   N)r   rC   r
   rD   rE   ÚassertIsInstancer½   Ústrr    s     r#   Ú test_streamStartUnicodeSessionIDz9ListenAuthenticatorTests.test_streamStartUnicodeSessionIDr  sc   € ð Œ^ˆØ
×Ò�-Ô7Ñ9Ô9Ñ:Ô:Ð:Ø
�Šðñ	
ô 	
ð 	
ð 	×Ò˜bœf¥cÑ*Ô*Ð*Ð*Ð*r%   N)r1   r2   r3   r4   rI   rú   r/  r5   r%   r#   r'  r'  T  sN   € € € € € ðð ðAð Að Að<ð <ð <ð*+ð +ð +ð +ð +r%   r'  c                   ó’   — e Zd Zd„ Zd„ Zd„ Z eeŽ d„ ¦   «         Z eeŽ d„ ¦   «         Z	 eeŽ d„ ¦   «         Z
d„ Zd„ Zd	„ Zd
„ Zd„ ZdS )ÚTLSInitiatingInitializerTestsc                 ó€  — g | _         g | _        t          j        | _        t          j        d¦  «        | _        t          j        | j        ¦  «        | _        | j         j        | j        _	        | j         
                    ¦   «          | j                             d¦  «         t          j        | j        ¦  «        | _        d S )Nr"  rÀ   )ÚoutputÚdoner   r   ÚsavedSSLr<   rH   r>   rá   rR   rã   rE   ÚTLSInitiatingInitializerr  r*   s    r#   rI   z#TLSInitiatingInitializerTests.setUp‚  s�   € ØˆŒØˆŒ	å!œˆŒå&Ô;¸MÑJÔJˆÔÝ"Ô,¨TÔ-?Ñ@Ô@ˆŒØ"œkÔ0ˆŒÔØŒ×%Ò%Ñ'Ô'Ð'ØŒ×#Ò#ð;ñ	
ô 	
ð 	
õ
 Ô6°t´~ÑFÔFˆŒ	ˆ	ˆ	r%   c                 ó(   — | j         t          _        d S ry   )r5  r   r   r*   s    r#   ÚtearDownz&TLSInitiatingInitializerTests.tearDown“  s   € Øœ�	Œˆˆr%   c                 ó„   — t          j        | j         d¬¦  «        | _        |                      | j        j        ¦  «         dS )z>
        Passing required sets the instance variable.
        T)ÚrequiredN)r   r6  r  rM   r:  r*   s    r#   Útest_initRequiredz/TLSInitiatingInitializerTests.test_initRequired–  s;   € õ Ô6°t´~ÐPTÐUÑUÔUˆŒ	Ø�Š˜œ	Ô*Ñ+Ô+Ð+Ð+Ð+r%   c                 ó€  ‡ — t          j        ¦   «         ‰ j        _        ˆ fd„‰ j        j        _        ˆ fd„‰ j        _        ˆ fd„‰ j        _        ‰ j                             ¦   «         }| 	                    ‰ j
        t          j        ¦  «         ‰  
                    dt          ‰ j        ¦  «        ¦  «         ‰ j        d         }‰  
                    d|j        ¦  «         ‰  
                    t          |j        ¦  «         ‰ j                             dt          z  ¦  «         ‰  
                    g d¢‰ j        ¦  «         |S )	zN
        When TLS is wanted and SSL available, StartTLS is initiated.
        c                 ó8   •— ‰j                              d¦  «        S ©NÚTLS©r4  rá   )Úctxr!   s    €r#   ú<lambda>zDTLSInitiatingInitializerTests.test_wantedSupported.<locals>.<lambda>£  s   ø€ ¸¼	×8HÒ8HÈÑ8OÔ8O€ r%   c                  ó8   •— ‰ j                              d¦  «        S ©NrÒ   r@  r*   s   €r#   rB  zDTLSInitiatingInitializerTests.test_wantedSupported.<locals>.<lambda>¤  ó   ø€  t¤y×'7Ò'7¸Ñ'@Ô'@€ r%   c                  ó8   •— ‰ j                              d¦  «        S ©NÚheaderr@  r*   s   €r#   rB  zDTLSInitiatingInitializerTests.test_wantedSupported.<locals>.<lambda>¥  ó   ø€ ¨D¬I×,<Ò,<¸XÑ,FÔ,F€ r%   é   r   Ústarttlsú<proceed xmlns='%s'/>©r?  rÒ   rH  )r
   rD   r   rP   ÚstartTLSrÒ   r§   r  Ústartr]   r   ÚResetrí   r3  ÚnameÚNS_XMPP_TLSÚurirE   r4  )r!   r^   rK  s   `  r#   Útest_wantedSupportedz2TLSInitiatingInitializerTests.test_wantedSupported�  s  ø€ õ
 $1Ô#@Ñ#BÔ#BˆŒÔ Ø,OÐ,OÐ,OÐ,OˆŒÔ Ô)Ø@Ð@Ð@Ð@ˆŒÔØ$FÐ$FÐ$FÐ$FˆŒÔ!àŒI�OŠOÑÔˆØ	�Š�dÔ&­	¬Ñ8Ô8Ð8Ø×Ò˜�C ¤Ñ,Ô,Ñ-Ô-Ð-Ø”;˜q”>ˆØ×Ò˜ X¤]Ñ3Ô3Ð3Ø×Ò� h¤lÑ3Ô3Ð3ØŒ×#Ò#Ð$;½kÑ$IÑJÔJÐJØ×ÒÐ3Ð3Ð3°T´YÑ?Ô?Ð?àˆr%   c                 óZ  ‡ — ˆ fd„}t          j        ¦   «         ‰ j        _        |‰ j        j        _        ˆ fd„‰ j        _        ˆ fd„‰ j        _        ‰ j                             ¦   «         }‰ j         	                    dt          z  ¦  «         ‰                      g d¢‰ j        ¦  «         |S )z:
        The server certificate will be verified.
        c                 ó¨   •— ‰                      | t          ¦  «         ‰                     | j        d¦  «         ‰j                             d¦  «         d S )Nr"  r?  )r-  r   r   Ú	_hostnamer4  rá   )ÚcontextFactoryr!   s    €r#   ÚfakeStartTLSzJTLSInitiatingInitializerTests.test_certificateVerify.<locals>.fakeStartTLS¸  sO   ø€ Ø×!Ò! .Õ2BÑCÔCÐCØ×Ò˜^Ô5°}ÑEÔEÐEØŒI×Ò˜UÑ#Ô#Ð#Ð#Ð#r%   c                  ó8   •— ‰ j                              d¦  «        S rD  r@  r*   s   €r#   rB  zFTLSInitiatingInitializerTests.test_certificateVerify.<locals>.<lambda>¿  rE  r%   c                  ó8   •— ‰ j                              d¦  «        S rG  r@  r*   s   €r#   rB  zFTLSInitiatingInitializerTests.test_certificateVerify.<locals>.<lambda>À  rI  r%   rL  rM  )r
   rD   r   rP   rN  rÒ   r§   r  rO  rE   rR  r   r4  )r!   rY  r^   s   `  r#   Útest_certificateVerifyz4TLSInitiatingInitializerTests.test_certificateVerify²  sµ   ø€ ð	$ð 	$ð 	$ð 	$ð 	$õ
 $1Ô#@Ñ#BÔ#BˆŒÔ Ø,8ˆŒÔ Ô)Ø@Ð@Ð@Ð@ˆŒÔØ$FÐ$FÐ$FÐ$FˆŒÔ!àŒI�OŠOÑÔˆØŒ×#Ò#Ð$;½kÑ$IÑJÔJÐJØ×ÒÐ3Ð3Ð3°T´YÑ?Ô?Ð?Øˆr%   c                 óÒ  ‡ ‡— t          ¦   «         Št          j        ‰ j        ‰¬¦  «        ‰ _        ‰‰ j        _        ˆˆ fd„}t          j        ¦   «         ‰ j        _        |‰ j        j        _        ˆ fd„‰ j        _	        ˆ fd„‰ j        _
        ‰ j                             ¦   «         }‰ j                             dt          z  ¦  «         ‰                      g d¢‰ j        ¦  «         |S )zH
        A custom contextFactory is passed through to startTLS.
        )ÚconfigurationForTLSc                 óh   •— ‰                      ‰| ¦  «         ‰j                             d¦  «         d S r>  )ÚassertIsr4  rá   )rX  rA  r!   s    €€r#   rY  zQTLSInitiatingInitializerTests.test_certificateVerifyContext.<locals>.fakeStartTLSÓ  s3   ø€ Ø�MŠM˜#˜~Ñ.Ô.Ð.ØŒI×Ò˜UÑ#Ô#Ð#Ð#Ð#r%   c                  ó8   •— ‰ j                              d¦  «        S rD  r@  r*   s   €r#   rB  zMTLSInitiatingInitializerTests.test_certificateVerifyContext.<locals>.<lambda>Ù  rE  r%   c                  ó8   •— ‰ j                              d¦  «        S rG  r@  r*   s   €r#   rB  zMTLSInitiatingInitializerTests.test_certificateVerifyContext.<locals>.<lambda>Ú  rI  r%   rL  rM  )r   r   r6  r  rX  r
   rD   rP   rN  rÒ   r§   rO  rE   rR  r   r4  )r!   rY  r^   rA  s   `  @r#   Útest_certificateVerifyContextz;TLSInitiatingInitializerTests.test_certificateVerifyContextÇ  sô   øø€ õ
 !Ñ"Ô"ˆÝÔ6ØŒN°ð
ñ 
ô 
ˆŒ	ð $'ˆŒ	Ô ð	$ð 	$ð 	$ð 	$ð 	$ð 	$õ $1Ô#@Ñ#BÔ#BˆŒÔ Ø,8ˆŒÔ Ô)Ø@Ð@Ð@Ð@ˆŒÔØ$FÐ$FÐ$FÐ$FˆŒÔ!àŒI�OŠOÑÔˆØŒ×#Ò#Ð$;½kÑ$IÑJÔJÐJØ×ÒÐ3Ð3Ð3°T´YÑ?Ô?Ð?Øˆr%   c                 óî   — dt           _        d| j        _        | j                             ¦   «         }|                     | j        d¦  «         |                      dt          | j        ¦  «        ¦  «         |S )zX
        No StartTLS is initiated when wanted, not required, SSL not available.
        NFr   )	r   r   r  r:  rO  r]   r   rí   r3  r„   s     r#   Ú"test_wantedNotSupportedNotRequiredz@TLSInitiatingInitializerTests.test_wantedNotSupportedNotRequiredá  sb   € ð �	ŒØ"ˆŒ	ÔàŒI�OŠOÑÔˆØ	�Š�dÔ&¨Ñ-Ô-Ð-Ø×Ò˜�C ¤Ñ,Ô,Ñ-Ô-Ð-àˆr%   c                 óø   — dt           _        d| j        _        | j                             ¦   «         }|                      |t           j        ¦  «         |                      dt          | j	        ¦  «        ¦  «         |S )zS
        TLSNotSupported is raised when TLS is required but not available.
        NTr   )
r   r   r  r:  rO  rb   ÚTLSNotSupportedr   rí   r3  r„   s     r#   Útest_wantedNotSupportedRequiredz=TLSInitiatingInitializerTests.test_wantedNotSupportedRequiredî  sd   € ð �	ŒØ!ˆŒ	ÔàŒI�OŠOÑÔˆØ×Ò˜1�iÔ7Ñ8Ô8Ð8Ø×Ò˜�C ¤Ñ,Ô,Ñ-Ô-Ð-àˆr%   c                 óf  — t          j        d¦  «        }|                     d¦  «         |j        |j        f|i| j        _        d| j        _        | j         	                    ¦   «         }|  
                    dt          | j        ¦  «        ¦  «         |                      |t
          j        ¦  «         |S )zW
        TLSRequired is raised when TLS is not wanted, but required by server.
        ©r   rK  r:  Fr   )r   rÙ   Ú
addElementrS  rQ  r   rØ   r  ÚwantedrO  r   rí   r3  rb   ÚTLSRequired©r!   Útlsr^   s      r#   Útest_notWantedRequiredz4TLSInitiatingInitializerTests.test_notWantedRequiredû  s—   € õ ŒnÐLÑMÔMˆØ�Š�zÑ"Ô"Ð"Ø$'¤G¨S¬XÐ#6¸Ð"<ˆŒÔØ ˆŒ	ÔàŒI�OŠOÑÔˆØ×Ò˜�C ¤Ñ,Ô,Ñ-Ô-Ð-Ø×Ò˜1�iÔ3Ñ4Ô4Ð4àˆr%   c                 óJ  — t          j        d¦  «        }|j        |j        f|i| j        _        d| j        _        d| j        _        | j         	                    ¦   «         }| 
                    | j        d¦  «         |                      dt          | j        ¦  «        ¦  «         |S )zL
        No StartTLS is initiated when not wanted and not required.
        rj  FNr   )r   rÙ   rS  rQ  r   rØ   r  rl  r:  rO  r]   r   rí   r3  rn  s      r#   Útest_notWantedNotRequiredz7TLSInitiatingInitializerTests.test_notWantedNotRequired
  s�   € õ ŒnÐLÑMÔMˆØ$'¤G¨S¬XÐ#6¸Ð"<ˆŒÔØ ˆŒ	ÔØ"ˆŒ	ÔàŒI�OŠOÑÔˆØ	�Š�dÔ&¨Ñ-Ô-Ð-Ø×Ò˜�C ¤Ñ,Ô,Ñ-Ô-Ð-Øˆr%   c                 óÔ   — dt           _        | j                             ¦   «         }|                      |t           j        ¦  «         | j                              dt          z  ¦  «         |S )zN
        TLSFailed is raised when the server responds with a failure.
        r   z<failure xmlns='%s'/>)r   r   r  rO  rb   Ú	TLSFailedrE   rR  r„   s     r#   Útest_failedz)TLSInitiatingInitializerTests.test_failed  sV   € ð �	ŒàŒI�OŠOÑÔˆØ×Ò˜1�iÔ1Ñ2Ô2Ð2ØŒ×#Ò#Ð$;½kÑ$IÑJÔJÐJØˆr%   N)r1   r2   r3   rI   r8  r;  r   ÚskipWhenNoSSLrT  r\  rc  re  rh  rp  rr  ru  r5   r%   r#   r1  r1  �  sø   € € € € € ðGð Gð Gð"&ð &ð &ð,ð ,ð ,ð €Vˆ]Ððð ñ Ôðð( €Vˆ]Ððð ñ Ôðð( €Vˆ]Ððð ñ Ôðð2ð ð ðð ð ðð ð ðð ð ðð ð ð ð r%   r1  c                   ó   — e Zd ZdZd„ ZdS )ÚTestFeatureInitializerr#  c                 ó*   — t          j        d ¦  «        S ry   )r   Úsucceedr*   s    r#   rO  zTestFeatureInitializer.start*  s   € ÝŒ}˜TÑ"Ô"Ð"r%   N)r1   r2   r3   ÚfeaturerO  r5   r%   r#   rx  rx  '  s(   € € € € € Ø €Gð#ð #ð #ð #ð #r%   rx  c                   ó&   — e Zd Zd„ Zd„ Zd„ Zd„ ZdS )Ú%BaseFeatureInitiatingInitializerTestsc                 óŒ   — t          j        t          j        ¦   «         ¦  «        | _         t          | j         ¦  «        | _        d S ry   )r   r>   rœ   rx  r  r*   s    r#   rI   z+BaseFeatureInitiatingInitializerTests.setUp/  s2   € Ý"Ô,­YÔ-DÑ-FÔ-FÑGÔGˆŒÝ*¨4¬>Ñ:Ô:ˆŒ	ˆ	ˆ	r%   c                 óœ   — | j         j        t          j        | j         j        ¦  «        i| j        _        | j                              ¦   «         S )zW
        Test that an advertized feature results in successful initialization.
        )r  r{  r   rÙ   r   rØ   r  r*   s    r#   ÚtestAdvertizedz4BaseFeatureInitiatingInitializerTests.testAdvertized3  s;   € ð $(¤9Ô#4µf´nÀTÄYÔEVÑ6WÔ6WÐ"XˆŒÔØŒy×#Ò#Ñ%Ô%Ð%r%   c                 ór   — d| j         _        |                      t          j        | j         j        ¦  «         dS )z€
        Test that when the feature is not advertized, but required by the
        initializer, an exception is raised.
        TN)r  r:  r(   r   ÚFeatureNotAdvertizedr  r*   s    r#   ÚtestNotAdvertizedRequiredz?BaseFeatureInitiatingInitializerTests.testNotAdvertizedRequired:  s2   € ð
 "ˆŒ	ÔØ×Ò�)Ô8¸$¼)Ô:NÑOÔOÐOÐOÐOr%   c                 óx   — d| j         _        |                      d| j                              ¦   «         ¦  «         dS )z�
        Test that when the feature is not advertized, and not required by the
        initializer, the initializer silently succeeds.
        FN)r  r:  rù   r  r*   s    r#   ÚtestNotAdvertizedNotRequiredzBBaseFeatureInitiatingInitializerTests.testNotAdvertizedNotRequiredB  s8   € ð
 #ˆŒ	ÔØ×Ò˜T 4¤9×#7Ò#7Ñ#9Ô#9Ñ:Ô:Ð:Ð:Ð:r%   N)r1   r2   r3   rI   r€  rƒ  r…  r5   r%   r#   r}  r}  .  sS   € € € € € ð;ð ;ð ;ð&ð &ð &ðPð Pð Pð;ð ;ð ;ð ;ð ;r%   r}  c                   ó2   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚToResponseTestsc                 óŒ  — t          j        d¦  «        }d|d<   d|d<   d|d<   d|d	<   t          j        |d
¦  «        }|                      ||¦  «         |                      |d         d¦  «         |                      |d         d¦  «         |                      |d         d
¦  «         |                      |d	         d¦  «         dS )zS
        Test that a response stanza is generated with addressing swapped.
        ©r+  rG   r;   rK   úuser1@example.comÚtoúuser2@example.com/resourceÚfromÚstanza1rL   rZ   N)r   rÙ   r   Ú
toResponser  r   ©r!   ÚstanzaÚresponses      r#   Útest_toResponsezToResponseTests.test_toResponseL  sÒ   € õ ”Ð 7Ñ8Ô8ˆØˆˆv‰Ø*ˆˆt‰Ø5ˆˆv‰Ø ˆˆt‰ÝÔ'¨°Ñ9Ô9ˆØ×Ò ¨Ñ1Ô1Ð1Ø×Ò˜ &Ô)Ð+>Ñ?Ô?Ð?Ø×Ò˜ $œÐ)EÑFÔFÐFØ×Ò˜ &Ô)¨8Ñ4Ô4Ð4Ø×Ò˜ $œ¨Ñ3Ô3Ð3Ð3Ð3r%   c                 óò   — t          j        d¦  «        }d|d<   d|d<   t          j        |¦  «        }|                      |d         d¦  «         |                      |                     d¦  «        ¦  «         dS )zY
        Test that a response is generated from a stanza without a from address.
        r‰  r;   rK   rŠ  r‹  r�  N)r   rÙ   r   r�  r   ri   ÚhasAttributer�  s      r#   Útest_toResponseNoFromz%ToResponseTests.test_toResponseNoFrom\  sz   € õ ”Ð 7Ñ8Ô8ˆØˆˆv‰Ø*ˆˆt‰ÝÔ'¨Ñ/Ô/ˆØ×Ò˜ &Ô)Ð+>Ñ?Ô?Ð?Ø×Ò˜×.Ò.¨tÑ4Ô4Ñ5Ô5Ð5Ð5Ð5r%   c                 óò   — t          j        d¦  «        }d|d<   d|d<   t          j        |¦  «        }|                      |                     d¦  «        ¦  «         |                      |d         d¦  «         dS )zW
        Test that a response is generated from a stanza without a to address.
        r‰  r;   rK   rŒ  r�  r‹  N)r   rÙ   r   r�  ri   r•  r   r�  s      r#   Útest_toResponseNoToz#ToResponseTests.test_toResponseNoTog  sy   € õ ”Ð 7Ñ8Ô8ˆØˆˆv‰Ø5ˆˆv‰ÝÔ'¨Ñ/Ô/ˆØ×Ò˜×.Ò.¨vÑ6Ô6Ñ7Ô7Ð7Ø×Ò˜ $œÐ)EÑFÔFÐFÐFÐFr%   c                 ó   — t          j        d¦  «        }d|d<   t          j        |¦  «        }|                      |                     d¦  «        ¦  «         |                      |                     d¦  «        ¦  «         dS )zY
        Test that a response is generated from a stanza without any addressing.
        ©r+  ÚmessageÚchatrK   r‹  r�  N©r   rÙ   r   r�  ri   r•  r�  s      r#   Útest_toResponseNoAddressingz+ToResponseTests.test_toResponseNoAddressingr  sw   € õ ”Ð <Ñ=Ô=ˆØˆˆv‰ÝÔ'¨Ñ/Ô/ˆØ×Ò˜×.Ò.¨tÑ4Ô4Ñ5Ô5Ð5Ø×Ò˜×.Ò.¨vÑ6Ô6Ñ7Ô7Ð7Ð7Ð7r%   c                 ó¦   — t          j        d¦  «        }t          j        |¦  «        }|                      |                     d¦  «        ¦  «         dS )zP
        Test that a proper response is generated without id attribute.
        rš  rL   Nr�  r�  s      r#   Ú	test_noIDzToResponseTests.test_noID|  sL   € õ ”Ð <Ñ=Ô=ˆÝÔ'¨Ñ/Ô/ˆØ×Ò˜×.Ò.¨tÑ4Ô4Ñ5Ô5Ð5Ð5Ð5r%   c                 ó¦   — t          j        d¦  «        }t          j        |¦  «        }|                      |                     d¦  «        ¦  «         dS )zR
        Test that a proper response is generated without type attribute.
        rš  rK   Nr�  r�  s      r#   Útest_noTypezToResponseTests.test_noType„  sL   € õ ”Ð <Ñ=Ô=ˆÝÔ'¨Ñ/Ô/ˆØ×Ò˜×.Ò.¨vÑ6Ô6Ñ7Ô7Ð7Ð7Ð7r%   N)	r1   r2   r3   r“  r–  r˜  rž  r   r¢  r5   r%   r#   r‡  r‡  K  sq   € € € € € ð4ð 4ð 4ð 	6ð 	6ð 	6ð	Gð 	Gð 	Gð8ð 8ð 8ð6ð 6ð 6ð8ð 8ð 8ð 8ð 8r%   r‡  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚDummyFactoryzJ
    Dummy XmlStream factory that only registers bootstrap observers.
    c                 ó   — i | _         d S ry   ©Ú	callbacksr*   s    r#   Ú__init__zDummyFactory.__init__’  s   € ØˆŒˆˆr%   c                 ó   — || j         |<   d S ry   r¦  )r!   ÚeventÚcallbacks      r#   ÚaddBootstrapzDummyFactory.addBootstrap•  s   € Ø (ˆŒ�uÑÐÐr%   N)r1   r2   r3   r4   r¨  r¬  r5   r%   r#   r¤  r¤  �  s<   € € € € € ðð ðð ð ð)ð )ð )ð )ð )r%   r¤  c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚDummyXMPPHandlerzO
    Dummy XMPP subprotocol handler to count the methods are called on it.
    c                 ó0   — d| _         d| _        d| _        d S )Nr   )ÚdoneMadeÚdoneInitializedÚdoneLostr*   s    r#   r¨  zDummyXMPPHandler.__init__ž  s   € ØˆŒØ ˆÔØˆŒˆˆr%   c                 ó.   — |                       ¦   «          d S ry   )rã   r    s     r#   rC   zDummyXMPPHandler.makeConnection£  s   € Ø×ÒÑÔÐÐÐr%   c                 ó&   — | xj         dz  c_         d S ©Nr   ©r°  r*   s    r#   rã   zDummyXMPPHandler.connectionMade¦  ó   € ØˆŒ˜ÑˆŒˆˆr%   c                 ó&   — | xj         dz  c_         d S rµ  )r±  r*   s    r#   ÚconnectionInitializedz&DummyXMPPHandler.connectionInitialized©  s   € ØÐÔ Ñ!ÐÔÐÐr%   c                 ó&   — | xj         dz  c_         d S rµ  )r²  ©r!   Úreasons     r#   ru   zDummyXMPPHandler.connectionLost¬  r·  r%   N)	r1   r2   r3   r4   r¨  rC   rã   r¹  ru   r5   r%   r#   r®  r®  ™  si   € € € € € ðð ðð ð ð
ð ð ðð ð ð"ð "ð "ðð ð ð ð r%   r®  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚFailureReasonXMPPHandlerz>
    Dummy handler specifically for failure Reason tests.
    c                 ó   — d| _         d S )NF)ÚgotFailureReasonr*   s    r#   r¨  z!FailureReasonXMPPHandler.__init__µ  s   € Ø %ˆÔÐÐr%   c                 óL   — t          |t          j        ¦  «        r	d| _        d S d S r�   )Ú
isinstancer	   ÚFailurerÀ  r»  s     r#   ru   z'FailureReasonXMPPHandler.connectionLost¸  s.   € Ý�f�gœoÑ.Ô.ð 	)Ø$(ˆDÔ!Ð!Ð!ð	)ð 	)r%   N)r1   r2   r3   r4   r¨  ru   r5   r%   r#   r¾  r¾  °  s<   € € € € € ðð ð&ð &ð &ð)ð )ð )ð )ð )r%   r¾  c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚXMPPHandlerTestsz-
    Tests for L{xmlstream.XMPPHandler}.
    c                 ó\   — t          t          j        t          j        ¦   «         ¦  «         dS )zN
        L{xmlstream.XMPPHandler} implements L{ijabber.IXMPPHandler}.
        N)r   r   ÚIXMPPHandlerr   ÚXMPPHandlerr*   s    r#   Útest_interfacezXMPPHandlerTests.test_interfaceÂ  s&   € õ 	•WÔ)­9Ô+@Ñ+BÔ+BÑCÔCÐCÐCÐCr%   c                 óÐ   —  G d„ d¦  «        }t          j        ¦   «         } |¦   «         |_        |                     d¦  «         |                      dg|j        j        ¦  «         dS )zP
        Test that data is passed on for sending by the stream manager.
        c                   ó   — e Zd Zd„ Zd„ ZdS )ú6XMPPHandlerTests.test_send.<locals>.DummyStreamManagerc                 ó   — g | _         d S ry   )Úoutlistr*   s    r#   r¨  z?XMPPHandlerTests.test_send.<locals>.DummyStreamManager.__init__Î  s   € Ø!�”��r%   c                 ó:   — | j                              |¦  «         d S ry   )rÎ  rá   )r!   Údatas     r#   rR   z;XMPPHandlerTests.test_send.<locals>.DummyStreamManager.sendÑ  s   € Ø”×#Ò# DÑ)Ô)Ð)Ð)Ð)r%   N)r1   r2   r3   r¨  rR   r5   r%   r#   ÚDummyStreamManagerrÌ  Í  s2   € € € € € ð"ð "ð "ð*ð *ð *ð *ð *r%   rÑ  rÕ   N)r   rÈ  ÚparentrR   r   rÎ  )r!   rÑ  Úhandlers      r#   rÛ   zXMPPHandlerTests.test_sendÈ  s   € ð
	*ð 	*ð 	*ð 	*ð 	*ñ 	*ô 	*ð 	*õ Ô'Ñ)Ô)ˆØ+Ð+Ñ-Ô-ˆŒØ�Š�]Ñ#Ô#Ð#Ø×Ò˜-˜¨'¬.Ô*@ÑAÔAÐAÐAÐAr%   c                 ó(  —  G d„ dt           j        ¦  «        } |¦   «         }t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                      |j        ¦  «         |                      ||j         ¦  «         dS )zY
        Test that makeConnection saves the XML stream and calls connectionMade.
        c                   ó   — e Zd Zd„ ZdS )ú=XMPPHandlerTests.test_makeConnection.<locals>.TestXMPPHandlerc                 ó   — d| _         d S r�   r¶  r*   s    r#   rã   zLXMPPHandlerTests.test_makeConnection.<locals>.TestXMPPHandler.connectionMadeß  s   € Ø $�”��r%   N)r1   r2   r3   rã   r5   r%   r#   ÚTestXMPPHandlerrÖ  Þ  s#   € € € € € ð%ð %ð %ð %ð %r%   rØ  N)r   rÈ  r>   rœ   rC   rM   r°  rù   )r!   rØ  rÓ  r_   s       r#   Útest_makeConnectionz$XMPPHandlerTests.test_makeConnectionÙ  sŸ   € ð
	%ð 	%ð 	%ð 	%ð 	%�iÔ3ñ 	%ô 	%ð 	%ð "�/Ñ#Ô#ˆÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ×Ò˜rÑ"Ô"Ð"Ø�Š˜Ô(Ñ)Ô)Ð)Ø×Ò˜R Ô!2Ñ3Ô3Ð3Ð3Ð3r%   c                 ó  — t          j        ¦   «         }t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                     t          ¦   «         ¦  «         |                      d|j         ¦  «         dS )zB
        Test that connectionLost forgets the XML stream.
        N)r   rÈ  r>   rœ   rC   ru   Ú	Exceptionrù   )r!   rÓ  r_   s      r#   Útest_connectionLostz$XMPPHandlerTests.test_connectionLostè  sv   € õ Ô'Ñ)Ô)ˆÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ×Ò˜rÑ"Ô"Ð"Ø×Ò�y™{œ{Ñ+Ô+Ð+Ø×Ò˜T 7Ô#4Ñ5Ô5Ð5Ð5Ð5r%   N)r1   r2   r3   r4   rÉ  rÛ   rÙ  rÜ  r5   r%   r#   rÅ  rÅ  ½  s`   € € € € € ðð ðDð Dð DðBð Bð Bð"4ð 4ð 4ð6ð 6ð 6ð 6ð 6r%   rÅ  c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚXMPPHandlerCollectionTestsz7
    Tests for L{xmlstream.XMPPHandlerCollection}.
    c                 ó6   — t          j        ¦   «         | _        d S ry   )r   ÚXMPPHandlerCollectionÚ
collectionr*   s    r#   rI   z XMPPHandlerCollectionTests.setUpø  s   € Ý#Ô9Ñ;Ô;ˆŒˆˆr%   c                 óD   — t          t          j        | j        ¦  «         dS )zZ
        L{xmlstream.StreamManager} implements L{ijabber.IXMPPHandlerCollection}.
        N)r   r   ÚIXMPPHandlerCollectionrá  r*   s    r#   rÉ  z)XMPPHandlerCollectionTests.test_interfaceû  s   € õ 	•WÔ3°T´_ÑEÔEÐEÐEÐEr%   c                 óÌ   — t          ¦   «         }|                     | j        ¦  «         |                      || j        ¦  «         |                      | j        |j        ¦  «         dS )z:
        Test the addition of a protocol handler.
        N)r®  ÚsetHandlerParentrá  rT   rù   rÒ  ©r!   rÓ  s     r#   Útest_addHandlerz*XMPPHandlerCollectionTests.test_addHandler  s[   € õ #Ñ$Ô$ˆØ× Ò  ¤Ñ1Ô1Ð1Ø�Š�g˜tœÑ/Ô/Ð/Ø×Ò˜Tœ_¨g¬nÑ=Ô=Ð=Ð=Ð=r%   c                 óö   — t          ¦   «         }|                     | j        ¦  «         |                     | j        ¦  «         |                      || j        ¦  «         |                      d|j        ¦  «         dS )z5
        Test removal of a protocol handler.
        N)r®  rå  rá  ÚdisownHandlerParentrq   rù   rÒ  ræ  s     r#   Útest_removeHandlerz-XMPPHandlerCollectionTests.test_removeHandler
  sq   € õ #Ñ$Ô$ˆØ× Ò  ¤Ñ1Ô1Ð1Ø×#Ò# D¤OÑ4Ô4Ð4Ø×Ò˜ $¤/Ñ2Ô2Ð2Ø×Ò˜T 7¤>Ñ2Ô2Ð2Ð2Ð2r%   N)r1   r2   r3   r4   rI   rÉ  rç  rê  r5   r%   r#   rÞ  rÞ  ó  s]   € € € € € ðð ð<ð <ð <ðFð Fð Fð>ð >ð >ð3ð 3ð 3ð 3ð 3r%   rÞ  c                   óf   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚStreamManagerTestsz/
    Tests for L{xmlstream.StreamManager}.
    c                 óT   — t          ¦   «         }t          j        |¦  «        | _        d S ry   )r¤  r   ÚStreamManagerÚstreamManager)r!   Úfactorys     r#   rI   zStreamManagerTests.setUp  s$   € Ý‘.”.ˆÝ&Ô4°WÑ=Ô=ˆÔÐÐr%   c                 óØ  — | j         }|                      d|j        ¦  «         |                      g |j        ¦  «         |                      |j        |j        j        d         ¦  «         |                      |j        |j        j        d         ¦  «         |                      |j	        |j        j        d         ¦  «         |                      |j
        |j        j        d         ¦  «         dS )zM
        Test correct initialization and setup of factory observers.
        Nz//event/stream/connectedr  rš   r  )rï  rù   r   r   ÚhandlersÚ
_connectedrð  r§  Ú_authdÚ_disconnectedÚinitializationFailed)r!   Úsms     r#   r$   zStreamManagerTests.test_basic  sä   € ð ÔˆØ×Ò˜T 2¤<Ñ0Ô0Ð0Ø×Ò˜˜Rœ[Ñ)Ô)Ð)Ø×ÒØŒM˜2œ:Ô/Ð0JÔKñ	
ô 	
ð 	
ð 	×Ò˜œ B¤JÔ$8Ð9OÔ$PÑQÔQÐQØ×Ò˜Ô)¨2¬:Ô+?Ð@TÔ+UÑVÔVÐVØ×ÒØÔ# R¤ZÔ%9Ð:SÔ%Tñ	
ô 	
ð 	
ð 	
ð 	
r%   c                 óp  — | j         }t          ¦   «         }|                     |¦  «         t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         dS )z
        Test that protocol handlers have their connectionMade method called
        when the XML stream is connected.
        r   r   N)rï  r®  rå  r   r>   rœ   ró  r   r°  r±  r²  ©r!   r÷  rÓ  r_   s       r#   Útest_connectedz!StreamManagerTests.test_connected.  s§   € ð
 ÔˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$ÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�Š�bÑÔÐØ×Ò˜˜GÔ,Ñ-Ô-Ð-Ø×Ò˜˜GÔ3Ñ4Ô4Ð4Ø×Ò˜˜GÔ,Ñ-Ô-Ð-Ð-Ð-r%   c                 ó:  — | j         }t          ¦   «         }|                     |¦  «         t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         dS )zP
        Test raw data functions unset when logTraffic is set to False.
        N)
rï  r®  rå  r   r>   rœ   ró  rù   ÚrawDataInFnÚrawDataOutFnrù  s       r#   Útest_connectedLogTrafficFalsez0StreamManagerTests.test_connectedLogTrafficFalse<  sŒ   € ð ÔˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$ÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�Š�bÑÔÐØ×Ò˜T 2¤>Ñ2Ô2Ð2Ø×Ò˜T 2¤?Ñ3Ô3Ð3Ð3Ð3r%   c                 óH  — | j         }d|_        t          ¦   «         }|                     |¦  «         t	          j        t	          j        ¦   «         ¦  «        }|                     |¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         dS )zM
        Test raw data functions set when logTraffic is set to True.
        TN)rï  Ú
logTrafficr®  rå  r   r>   rœ   ró  r  rü  rý  rù  s       r#   Útest_connectedLogTrafficTruez/StreamManagerTests.test_connectedLogTrafficTrueH  s“   € ð ÔˆØˆŒÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$ÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�Š�bÑÔÐØ×Ò  b¤nÑ5Ô5Ð5Ø×Ò  b¤oÑ6Ô6Ð6Ð6Ð6r%   c                 óp  — | j         }t          ¦   «         }|                     |¦  «         t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         dS )zˆ
        Test that protocol handlers have their connectionInitialized method
        called when the XML stream is initialized.
        r   r   N)rï  r®  rå  r   r>   rœ   rô  r   r°  r±  r²  rù  s       r#   Ú
test_authdzStreamManagerTests.test_authdU  s¤   € ð
 ÔˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$ÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�	Š	�"‰ŒˆØ×Ò˜˜GÔ,Ñ-Ô-Ð-Ø×Ò˜˜GÔ3Ñ4Ô4Ð4Ø×Ò˜˜GÔ,Ñ-Ô-Ð-Ð-Ð-r%   c                 óp  — | j         }t          ¦   «         }|                     |¦  «         t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                      d|j        ¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         dS )z‚
        Test that protocol handlers have their connectionLost method
        called when the XML stream is disconnected.
        r   r   N)rï  r®  rå  r   r>   rœ   rõ  r   r°  r±  r²  rù  s       r#   Útest_disconnectedz$StreamManagerTests.test_disconnectedc  s©   € ð
 ÔˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$ÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
×Ò˜ÑÔÐØ×Ò˜˜GÔ,Ñ-Ô-Ð-Ø×Ò˜˜GÔ3Ñ4Ô4Ð4Ø×Ò˜˜GÔ,Ñ-Ô-Ð-Ð-Ð-r%   c                 óø   — | j         }t          ¦   «         }|                     |¦  «         |                     t	          j        t          d¦  «        ¦  «        ¦  «         |                      d|j        ¦  «         dS )zŸ
        A L{STREAM_END_EVENT} results in L{StreamManager} firing the handlers
        L{connectionLost} methods, passing a L{failure.Failure} reason.
        z	no reasonTN)	rï  r¾  rå  rõ  r	   rÃ  rÛ  r   rÀ  ©r!   r÷  rÓ  s      r#   Útest_disconnectedReasonz*StreamManagerTests.test_disconnectedReasonq  sp   € ð
 ÔˆÝ*Ñ,Ô,ˆØ× Ò  Ñ$Ô$Ð$Ø
×Ò�œ­°;Ñ)?Ô)?Ñ@Ô@ÑAÔAÐAØ×Ò˜˜wÔ7Ñ8Ô8Ð8Ð8Ð8r%   c                 óü   — | j         }t          ¦   «         }|                     |¦  «         |                      d|j        ¦  «         |                      d|j        ¦  «         |                      d|j        ¦  «         dS )zN
        Test the addition of a protocol handler while not connected.
        r   N)rï  r®  rå  r   r°  r±  r²  r  s      r#   rç  z"StreamManagerTests.test_addHandler|  s|   € ð ÔˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$à×Ò˜˜GÔ,Ñ-Ô-Ð-Ø×Ò˜˜GÔ3Ñ4Ô4Ð4Ø×Ò˜˜GÔ,Ñ-Ô-Ð-Ð-Ð-r%   c                 óš  — | j         }t          j        t          j        ¦   «         ¦  «        }|                     |¦  «         |                     |¦  «         t          ¦   «         }|                     |¦  «         |                      d|j	        ¦  «         |                      d|j
        ¦  «         |                      d|j        ¦  «         dS )a  
        Test the addition of a protocol handler after the stream
        have been initialized.

        Make sure that the handler will have the connected stream
        passed via C{makeConnection} and have C{connectionInitialized}
        called.
        r   r   N)rï  r   r>   rœ   ró  rô  r®  rå  r   r°  r±  r²  )r!   r÷  r_   rÓ  s       r#   Útest_addHandlerInitializedz-StreamManagerTests.test_addHandlerInitializedˆ  s¶   € ð ÔˆÝÔ ¥Ô!8Ñ!:Ô!:Ñ;Ô;ˆØ
�Š�bÑÔÐØ
�	Š	�"‰ŒˆÝ"Ñ$Ô$ˆØ× Ò  Ñ$Ô$Ð$à×Ò˜˜GÔ,Ñ-Ô-Ð-Ø×Ò˜˜GÔ3Ñ4Ô4Ð4Ø×Ò˜˜GÔ,Ñ-Ô-Ð-Ð-Ð-r%   c                 óÔ  — t          j        t          j        ¦   «         ¦  «        }t          j        |¦  «        }|                     d¦  «        }t          j        ¦   «         |_        |                     ¦   «          | 	                    d¦  «         | 
                    |d¦  «         |                     d¦  «         |                      d|j                             ¦   «         ¦  «         dS )z€
        Test send when the stream has been initialized.

        The data should be sent directly over the XML stream.
        Nrì   r  rÕ   rÖ   )r   ÚXmlStreamFactoryrœ   rî  ÚbuildProtocolr
   rD   rP   rã   rE   ÚdispatchrR   r   rU   ©r!   rð  r÷  r_   s       r#   Útest_sendInitializedz'StreamManagerTests.test_sendInitializedœ  sÐ   € õ Ô,­YÔ-DÑ-FÔ-FÑGÔGˆÝÔ$ WÑ-Ô-ˆØ×"Ò" 4Ñ(Ô(ˆÝ$Ô4Ñ6Ô6ˆŒØ
×ÒÑÔÐØ
�Šð-ñ	
ô 	
ð 	
ð
 	�Š�BÐ.Ñ/Ô/Ð/Ø
�Š�ÑÔÐØ×Ò˜¨¬×);Ò);Ñ)=Ô)=Ñ>Ô>Ð>Ð>Ð>r%   c                 ó†  — t          j        t          j        ¦   «         ¦  «        }t          j        |¦  «        }t	          ¦   «         }|                     |¦  «         |                     d¦  «        }t          j        ¦   «         |_	        | 
                    d¦  «         |                      d|j	                             ¦   «         ¦  «         |                      d|j        d         ¦  «         |                     ¦   «          |                      d|j	                             ¦   «         ¦  «         |                      d|j        d         ¦  «         |                     d¦  «         |                     |d¦  «         |                      d|j	                             ¦   «         ¦  «         |                      |j        ¦  «         dS )z©
        Test send when there is no established XML stream.

        The data should be cached until an XML stream has been established and
        initialized.
        NrÕ   r%   r   rì   r  rÖ   )r   r  rœ   rî  r®  Ú
addHandlerr  r
   rD   rP   rR   r   rU   Ú_packetQueuerã   rE   r  ri   ©r!   rð  r÷  rÓ  r_   s        r#   Útest_sendNotConnectedz(StreamManagerTests.test_sendNotConnected°  s…  € õ Ô,­YÔ-DÑ-FÔ-FÑGÔGˆÝÔ$ WÑ-Ô-ˆÝ"Ñ$Ô$ˆØ
�Š�gÑÔÐà×"Ò" 4Ñ(Ô(ˆÝ$Ô4Ñ6Ô6ˆŒØ
�Š�ÑÔÐØ×Ò˜˜bœl×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ø×Ò˜¨¬¸Ô(:Ñ;Ô;Ð;à
×ÒÑÔÐØ×Ò˜˜bœl×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ø×Ò˜¨¬¸Ô(:Ñ;Ô;Ð;à
�Šð-ñ	
ô 	
ð 	
ð
 	�Š�BÐ.Ñ/Ô/Ð/à×Ò˜¨¬×);Ò);Ñ)=Ô)=Ñ>Ô>Ð>Ø×Ò˜œÑ)Ô)Ð)Ð)Ð)r%   c                 óê  — t          j        t          j        ¦   «         ¦  «        }t          j        |¦  «        }|                     d¦  «        }t          j        ¦   «         |_        |                     ¦   «          | 	                    d¦  «         | 
                    d¦  «         |                      d|j                             ¦   «         ¦  «         |                      d|j        d         ¦  «         dS )zŸ
        Test send when the stream is connected but not yet initialized.

        The data should be cached until the XML stream has been initialized.
        Nrì   rÕ   r%   r   )r   r  rœ   rî  r  r
   rD   rP   rã   rE   rR   r   rU   r  r  s       r#   Útest_sendNotInitializedz*StreamManagerTests.test_sendNotInitializedÐ  sØ   € õ Ô,­YÔ-DÑ-FÔ-FÑGÔGˆÝÔ$ WÑ-Ô-ˆØ×"Ò" 4Ñ(Ô(ˆÝ$Ô4Ñ6Ô6ˆŒØ
×ÒÑÔÐØ
�Šð-ñ	
ô 	
ð 	
ð
 	�Š�ÑÔÐØ×Ò˜˜bœl×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ø×Ò˜¨¬¸Ô(:Ñ;Ô;Ð;Ð;Ð;r%   c                 ó0  — t          j        t          j        ¦   «         ¦  «        }t          j        |¦  «        }t	          ¦   «         }|                     |¦  «         |                     d¦  «        }|                     ¦   «          t          j	        ¦   «         |_
        |                     d¦  «         |                     d¦  «         |                      d|j
                             ¦   «         ¦  «         |                      d|j        d         ¦  «         dS )z£
        Test send after XML stream disconnection.

        The data should be cached until a new XML stream has been established
        and initialized.
        NrÕ   r%   r   )r   r  rœ   rî  r®  r  r  rã   r
   rD   rP   ru   rR   r   rU   r  r  s        r#   Útest_sendDisconnectedz(StreamManagerTests.test_sendDisconnectedä  sì   € õ Ô,­YÔ-DÑ-FÔ-FÑGÔGˆÝÔ$ WÑ-Ô-ˆÝ"Ñ$Ô$ˆØ
�Š�gÑÔÐà×"Ò" 4Ñ(Ô(ˆØ
×ÒÑÔÐÝ$Ô4Ñ6Ô6ˆŒØ
×Ò˜$ÑÔÐà
�Š�ÑÔÐØ×Ò˜˜bœl×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ø×Ò˜¨¬¸Ô(:Ñ;Ô;Ð;Ð;Ð;r%   N)r1   r2   r3   r4   rI   r$   rú  rþ  r  r  r  r  rç  r  r  r  r  r  r5   r%   r#   rì  rì    sñ   € € € € € ðð ð>ð >ð >ð
ð 
ð 
ð .ð .ð .ð
4ð 
4ð 
4ð7ð 7ð 7ð.ð .ð .ð.ð .ð .ð	9ð 	9ð 	9ð
.ð 
.ð 
.ð.ð .ð .ð(?ð ?ð ?ð(*ð *ð *ð@<ð <ð <ð(<ð <ð <ð <ð <r%   rì  c                   ó0   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚXmlStreamServerFactoryTestsz8
    Tests for L{xmlstream.XmlStreamServerFactory}.
    c                 ó^   ‡—  G d„ d¦  «        Šˆfd„}t          j        |¦  «        | _        dS )zQ
        Set up a server factory with an authenticator factory function.
        c                   ó   — e Zd Zd„ Zd„ ZdS )ú<XmlStreamServerFactoryTests.setUp.<locals>.TestAuthenticatorc                 ó   — g | _         d S ry   )Ú
xmlstreamsr*   s    r#   r¨  zEXmlStreamServerFactoryTests.setUp.<locals>.TestAuthenticator.__init__  s   € Ø"$�”��r%   c                 ó:   — | j                              |¦  «         d S ry   )r!  rá   r    s     r#   rê   zPXmlStreamServerFactoryTests.setUp.<locals>.TestAuthenticator.associateWithStream  s   € Ø”×&Ò& rÑ*Ô*Ð*Ð*Ð*r%   N)r1   r2   r3   r¨  rê   r5   r%   r#   rë   r    s2   € € € € € ð%ð %ð %ð+ð +ð +ð +ð +r%   rë   c                  ó   •—  ‰ ¦   «         S ry   r5   )rë   s   €r#   ÚauthenticatorFactoryz?XmlStreamServerFactoryTests.setUp.<locals>.authenticatorFactory  s   ø€ Ø$Ð$Ñ&Ô&Ð&r%   N)r   ÚXmlStreamServerFactoryrð  )r!   r$  rë   s     @r#   rI   z!XmlStreamServerFactoryTests.setUpÿ  s]   ø€ ð
	+ð 	+ð 	+ð 	+ð 	+ñ 	+ô 	+ð 	+ð	'ð 	'ð 	'ð 	'ð 	'õ !Ô7Ð8LÑMÔMˆŒˆˆr%   c                 ó:   — t          t          | j        ¦  «         dS )z<
        L{XmlStreamServerFactory} is a L{Factory}.
        N)r   r   rð  r*   s    r#   rÉ  z*XmlStreamServerFactoryTests.test_interface  s   € õ 	Õ% t¤|Ñ4Ô4Ð4Ð4Ð4r%   c                 ó|   — | j                              d¦  «        }|                      |g|j        j        ¦  «         dS )a‹  
        The authenticator factory should be used to instantiate the
        authenticator and pass it to the protocol.

        The default protocol, L{XmlStream} stores the authenticator it is
        passed, and calls its C{associateWithStream} method. so we use that to
        check whether our authenticator factory is used and the protocol
        instance gets an authenticator.
        N)rð  r  r   rH   r!  r    s     r#   Ú,test_buildProtocolAuthenticatorInstantiationzHXmlStreamServerFactoryTests.test_buildProtocolAuthenticatorInstantiation  s=   € ð Œ\×'Ò'¨Ñ-Ô-ˆØ×Ò˜"˜˜rÔ/Ô:Ñ;Ô;Ð;Ð;Ð;r%   c                 óz   — | j                              d¦  «        }|                      |t          j        ¦  «         dS )zV
        The protocol factory creates Jabber XML Stream protocols by default.
        N)rð  r  r-  r   r>   r    s     r#   Útest_buildProtocolXmlStreamz7XmlStreamServerFactoryTests.test_buildProtocolXmlStream#  s8   € ð Œ\×'Ò'¨Ñ-Ô-ˆØ×Ò˜b¥)Ô"5Ñ6Ô6Ð6Ð6Ð6r%   c                 óÚ   — | j                              d¦  «        }| j                              d¦  «        }|                      ||¦  «         |                      |j        |j        ¦  «         dS )z’
        Subsequent calls to buildProtocol should result in different instances
        of the protocol, as well as their authenticators.
        N)rð  r  r  rH   )r!   Úxs1Úxs2s      r#   Útest_buildProtocolTwicez3XmlStreamServerFactoryTests.test_buildProtocolTwice*  sf   € ð
 Œl×(Ò(¨Ñ.Ô.ˆØŒl×(Ò(¨Ñ.Ô.ˆØ×Ò  SÑ)Ô)Ð)Ø×Ò Ô 1°3Ô3DÑEÔEÐEÐEÐEr%   N)	r1   r2   r3   r4   rI   rÉ  r(  r*  r.  r5   r%   r#   r  r  ú  sq   € € € € € ðð ðNð Nð Nð"5ð 5ð 5ð<ð <ð <ð7ð 7ð 7ðFð Fð Fð Fð Fr%   r  )9r4   r   r   Úzope.interface.verifyr   Útwisted.internetr   r   Útwisted.internet.errorr   Útwisted.internet.interfacesr   Útwisted.pythonr	   Útwisted.testr
   Útwisted.trialÚtwisted.words.protocols.jabberr   r   r   r   Ú!twisted.words.test.test_xmlstreamr   Útwisted.words.xishr   r   Ú_sslrv  Útwisted.internet._sslverifyr   Útwisted.internet.sslr   ÚImportErrorrR  ÚTestCaser   r7   r‹   rÛ  rñ   ró   r  r'  r1  Ú BaseFeatureInitiatingInitializerrx  r}  r‡  r¤  rÈ  r®  r¾  rÅ  rÞ  rì  r  r5   r%   r#   ú<module>r?     sâ  ððð ð Ð Ð Ð Ð Ð à .Ð .Ð .Ð .Ð .Ð .à (Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø "Ð "Ð "Ð "Ð "Ð "Ø &Ð &Ð &Ð &Ð &Ð &Ø "Ð "Ð "Ð "Ð "Ð "Ø IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IØ OÐ OÐ OÐ OÐ OÐ OØ %Ð %Ð %Ð %Ð %Ð %ð	8Ø,Ð,Ð,Ð,Ð,Ð,ð
 €CØ€MØ<Ð<Ð<Ð<Ð<Ð<Ø7Ð7Ð7Ð7Ð7Ð7Ð7øð ð 0ð 0ð 0Ø
€CØ/€M€M€Mð0øøøð 0€ðKð Kð Kð Kð K˜Ô)ñ Kô Kð Kð@_ð _ð _ð _ð _ˆhÔñ _ô _ð _ðDX6ð X6ð X6ð X6ð X6�XÔ&ñ X6ô X6ð X6ðv	ð 	ð 	ð 	ð 	�	ñ 	ô 	ð 	ð@-ð @-ð @-ð @-ð @-˜Ô*ñ @-ô @-ð @-ðFI/ð I/ð I/ð I/ð I/ Ô 1ñ I/ô I/ð I/ðX*+ð *+ð *+ð *+ð *+˜xÔ0ñ *+ô *+ð *+ðZcð cð cð cð c HÔ$5ñ cô cð cðL#ð #ð #ð #ð #˜YÔGñ #ô #ð #ð;ð ;ð ;ð ;ð ;¨HÔ,=ñ ;ô ;ð ;ð:?8ð ?8ð ?8ð ?8ð ?8�hÔ'ñ ?8ô ?8ð ?8ðD	)ð 	)ð 	)ð 	)ð 	)ñ 	)ô 	)ð 	)ðð ð ð ð �yÔ,ñ ô ð ð.
)ð 
)ð 
)ð 
)ð 
)˜yÔ4ñ 
)ô 
)ð 
)ð36ð 36ð 36ð 36ð 36�xÔ(ñ 36ô 36ð 36ðl3ð 3ð 3ð 3ð 3 Ô!2ñ 3ô 3ð 3ðDb<ð b<ð b<ð b<ð b<˜Ô*ñ b<ô b<ð b<ðJ8Fð 8Fð 8Fð 8Fð 8FÐ"Cñ 8Fô 8Fð 8Fð 8Fð 8Fs   ÁA% Á%	A1Á0A1