ó
    ×›‘hR6  ã                   óÔ  • S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
JrJr  SSKJr  SSKJr  SS	KJr   " S
 S5      r " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      r " S S\
R0                  5      r " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      rg)z7
Tests for L{twisted.words.protocols.jabber.component}
é    )Úsha1)ÚverifyObject)Úfailure)Úunittest)Ú	componentÚijabberÚ	xmlstream)ÚJID)Údomish)ÚXmlPipec                   ó    • \ rS rSrS rS rSrg)ÚDummyTransporté   c                 ó   • Xl         g ©N©Úlist)Úselfr   s     ÚkC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/words/test/test_jabbercomponent.pyÚ__init__ÚDummyTransport.__init__   s   € Ø�	ó    c                 ó:   • U R                   R                  U5        g r   )r   Úappend)r   Úbytess     r   ÚwriteÚDummyTransport.write   s   € Ø�	‰	×Ñ˜Õr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   Ú__static_attributes__© r   r   r   r      s   † òõ r   r   c                   ó    • \ rS rSrS rS rSrg)Ú#ComponentInitiatingInitializerTestsé   c                 óô  • / U l         [        R                  " 5       U l        SU R                  l        [        R
                  " U R                  5      U l        SU R                  l        U R                   R                  U R                  l        U R                  R                  5         U R                  R                  S5        SU R                  l        [        R                  " U R                  5      U l        g )NÚsecretútest:componentz‚<stream:stream xmlns='test:component' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345' version='1.0'>Ú12345)Úoutputr	   ÚAuthenticatorÚauthenticatorÚpasswordÚ	XmlStreamÚ	namespacer   ÚsendÚconnectionMadeÚdataReceivedÚsidr   ÚComponentInitiatingInitializerÚinit©r   s    r   ÚsetUpÚ)ComponentInitiatingInitializerTests.setUp   s­   € ØˆŒä&×4Ò4Ó6ˆÔØ&.ˆ×ÑÔ#Ü"×,Ò,¨T×-?Ñ-?Ó@ˆŒØ#3ˆ�‰Ô Ø"Ÿk™k×0Ñ0ˆ�‰ÔØ�‰×%Ñ%Ô'Ø�‰×#Ñ#ð;ô	
ð
 %ˆ�‰ÔÜ×<Ò<¸T¿^¹^ÓLˆ�	r   c                 óŒ  • U R                   R                  5       nU R                  S   nU R                  SUR                  5        U R                  SUR
                  5        U R                  [        S5      R                  5       [        U5      5        / Ul	        U R                  R                  UR                  5       5        U$ )z/
Test basic operations of component handshake.
éÿÿÿÿÚ	handshaker)   ó   12345secret)r6   Ú
initializer+   ÚassertEqualÚnameÚurir   Ú	hexdigestÚstrÚchildrenr	   r3   ÚtoXml)r   Údr<   s      r   ÚtestHandshakeÚ1ComponentInitiatingInitializerTests.testHandshake-   s™   € ð
 �I‰I× Ñ Ó"ˆð —K‘K ‘Oˆ	Ø×Ñ˜ i§n¡nÔ5Ø×ÑÐ)¨9¯=©=Ô9Ø×ÑœÐ2Ó3×=Ñ=Ó?ÄÀYÃÔPð  ˆ	ÔØ�‰×#Ñ# I§O¡OÓ$5Ô6àˆr   )r-   r6   r+   r	   N)r   r   r    r!   r8   rG   r"   r#   r   r   r%   r%      s   † òMõ"r   r%   c                   ó    • \ rS rSrS rS rSrg)ÚComponentAuthTestséC   c                 ó   • SU l         g ©NT©ÚauthComplete)r   Ústreams     r   Ú
authPassedÚComponentAuthTests.authPassedD   s
   € Ø ˆÕr   c                 ó  • SU l         / n[        R                  " SS5      n[        R                  " U5      n[        U5      Ul        UR                  [        R                  U R                  5        UR                  5         UR                  S5        [        S5      R                  5       R                  S5      nU R                  US   SU-   S	-   5        UR                  S
5        U R                  U R                   S5        g )NFÚcjidr(   sv   <stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' from='cjid' id='12345'>r=   Úasciié   s   <handshake>s   </handshake>ú<handshake/>T)rO   r   ÚConnectComponentAuthenticatorr	   r/   r   Ú	transportÚaddObserverÚSTREAM_AUTHD_EVENTrQ   r2   r3   r   rB   Úencoder?   )r   ÚoutlistÚcaÚxsÚhvs        r   ÚtestAuthÚComponentAuthTests.testAuthG   sÖ   € Ø!ˆÔØˆä×4Ò4°V¸XÓFˆÜ× Ò  Ó$ˆÜ% gÓ.ˆŒà
�‰”y×3Ñ3°T·_±_ÔEð 	×ÑÔØ
�‰ð Fô	
ô
 Ð&Ó'×1Ñ1Ó3×:Ñ:¸7ÓCˆà×Ñ˜ ™ ^°bÑ%8¸?Ñ%JÔKà
�‰˜Ô'à×Ñ˜×*Ñ*¨DÕ1r   rN   N)r   r   r    r!   rQ   ra   r"   r#   r   r   rJ   rJ   C   s   † ò!õ2r   rJ   c                   ó   • \ rS rSrSrS rSrg)ÚServiceTestséa   z!
Tests for L{component.Service}.
c                 ób   • [         R                  " 5       n[        [        R                  U5        g)z6
L{component.Service} implements L{ijabber.IService}.
N)r   ÚServicer   r   ÚIService)r   Úservices     r   Útest_interfaceÚServiceTests.test_interfacef   s"   € ô ×#Ò#Ó%ˆÜ”W×%Ñ% wÕ/r   r#   N)r   r   r    r!   Ú__doc__rj   r"   r#   r   r   rd   rd   a   s   † ñõ0r   rd   c                   ó,   • \ rS rSrS rS rS rS rSrg)ÚJabberServiceHarnessén   c                 ó.   • SU l         SU l        SU l        g )NF©ÚcomponentConnectedFlagÚcomponentDisconnectedFlagÚtransportConnectedFlagr7   s    r   r   ÚJabberServiceHarness.__init__o   s   € Ø&+ˆÔ#Ø).ˆÔ&Ø&+ˆÕ#r   c                 ó   • SU l         g rM   )rr   ©r   r	   s     r   ÚcomponentConnectedÚ'JabberServiceHarness.componentConnectedt   ó
   € Ø&*ˆÕ#r   c                 ó   • SU l         g rM   )rs   r7   s    r   ÚcomponentDisconnectedÚ*JabberServiceHarness.componentDisconnectedw   s
   € Ø)-ˆÕ&r   c                 ó   • SU l         g rM   )rt   rw   s     r   ÚtransportConnectedÚ'JabberServiceHarness.transportConnectedz   rz   r   rq   N)	r   r   r    r!   r   rx   r|   r   r"   r#   r   r   rn   rn   n   s   † ò,ò
+ò.õ+r   rn   c                   ó   • \ rS rSrS rSrg)ÚJabberServiceManagerTestsé~   c                 ó  • [         R                  " SS5      n[        5       nUR                  U5        / nUR	                  5       R                  S 5      nXl        UR                  UR                  l        UR                  5         U R                  SUR                  5        UR                  U[        R                  5        U R                  SUR                  5        UR!                  S 5        U R                  SUR"                  5        g )NÚfoor.   T)r   ÚServiceManagerrn   ÚsetServiceParentÚ
getFactoryÚbuildProtocolrY   r   r   r2   r?   rt   Údispatchr	   r[   rr   ÚconnectionLostrs   )r   ÚsmÚsvcÚwlistr_   s        r   ÚtestSMÚ JabberServiceManagerTests.testSM   sÚ   € ä×%Ò% e¨ZÓ8ˆÜ"Ó$ˆØ×Ñ˜RÔ ð ˆð �]‰]‹_×*Ñ*¨4Ó0ˆØŒØ"Ÿ\™\ˆ�‰Ôð 	×ÑÔð 	×Ñ˜˜s×9Ñ9Ô:ð 	�‰�Bœ	×4Ñ4Ô5ð 	×Ñ˜˜s×9Ñ9Ô:ð 	×Ñ˜$Ôð 	×Ñ˜˜s×<Ñ<Õ=r   r#   N)r   r   r    r!   r�   r"   r#   r   r   r‚   r‚   ~   s   † õ>r   r‚   c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚRouterTestsé    z 
Tests for L{component.Router}.
c                 óº  ^• [         R                  " 5       n/ mU4S jUl        [        5       nUR	                  SUR
                  5        U R                  S[        UR                  5      5        U R                  UR
                  UR                  S   5        [        R                  " S5      nUR                  R                  U5        U R                  U/T5        g)z:
Test route registration and routing on incoming stanzas.
c                 ó&   >• TR                  U 5      $ r   ©r   )ÚelementÚrouteds    €r   Ú<lambda>Ú+RouterTests.test_addRoute.<locals>.<lambda>«   s   ø€  v§}¡}°WÔ'=r   zexample.orgrV   )ÚtestnsÚtestN)r   ÚRouterÚrouter   ÚaddRouteÚsinkr?   ÚlenÚroutesr   ÚElementÚsourcer1   )r   ÚrouterÚpiper—   r˜   s       @r   Útest_addRouteÚRouterTests.test_addRoute¥   s¡   ø€ ô ×!Ò!Ó#ˆØˆÜ=ˆŒä‹yˆØ�‰˜ t§y¡yÔ1Ø×Ñ˜œC §¡Ó.Ô/Ø×Ñ˜Ÿ™ F§M¡M°-Ñ$@ÔAä—.’.Ð!3Ó4ˆØ�‰×Ñ˜Ô!Ø×Ñ˜'˜ FÕ+r   c                 ó¨  ^• [        5       n[        5       n[        R                  " 5       nUR                  SUR                  5        UR                  SUR                  5        / mUR
                  R                  SU4S j5        [        R                  " S5      nSUS'   SUS'   UR
                  R                  U5        U R                  U/T5        g)	z
Test routing of a message.
úcomponent1.example.orgzcomponent2.example.orgú/*c                 ó&   >• TR                  U 5      $ r   r–   ©r—   Úoutgoings    €r   r™   Ú(RouterTests.test_route.<locals>.<lambda>Á   s   ø€ ¸H¿O¹OÈGÔ<Tr   ©NÚpresenceÚfromÚtoN©r   r   r�   rŸ   r    r¤   rZ   r   r£   r1   r?   )r   Ú
component1Ú
component2r¥   Ústanzar®   s        @r   Ú
test_routeÚRouterTests.test_route¶   sª   ø€ ô “Yˆ
Ü“Yˆ
Ü×!Ò!Ó#ˆØ�‰Ð0°*·/±/ÔBØ�‰Ð0°*·/±/ÔBàˆØ×Ñ×%Ñ% dÔ,TÔUÜ—’Ð 2Ó3ˆØ1ˆˆv‰Ø/ˆˆt‰Ø×Ñ×Ñ˜vÔ&Ø×Ñ˜&˜ 8Õ,r   c                 ó¨  ^• [        5       n[        5       n[        R                  " 5       nUR                  SUR                  5        UR                  SUR                  5        / mUR
                  R                  SU4S j5        [        R                  " S5      nSUS'   SUS'   UR
                  R                  U5        U R                  U/T5        g)	zí
Test routing of a message using the default route.

The default route is the one with L{None} as its key in the
routing table. It is taken when there is no more specific route
in the routing table that matches the stanza's destination.
rª   Nr«   c                 ó&   >• TR                  U 5      $ r   r–   r­   s    €r   r™   Ú/RouterTests.test_routeDefault.<locals>.<lambda>×   s   ø€ °X·_±_ÀWÔ5Mr   r°   r²   zexample.comr³   r´   )r   rµ   Ús2sr¥   r·   r®   s        @r   Útest_routeDefaultÚRouterTests.test_routeDefaultÈ   s§   ø€ ô “Yˆ
Ü‹iˆÜ×!Ò!Ó#ˆØ�‰Ð0°*·/±/ÔBØ�‰˜˜cŸh™hÔ'àˆØ�
‰
×Ñ˜tÔ%MÔNÜ—’Ð 2Ó3ˆØ1ˆˆv‰Ø$ˆˆt‰Ø×Ñ×Ñ˜vÔ&Ø×Ñ˜&˜ 8Õ,r   r#   N)	r   r   r    r!   rl   r§   r¸   r¾   r"   r#   r   r   r’   r’       s   † ñò,ò"-õ$-r   r’   c                   óN   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSrg)Ú!ListenComponentAuthenticatorTestséß   z6
Tests for L{component.ListenComponentAuthenticator}.
c                 ó¾   • / U l         [        R                  " S5      n[        R                  " U5      U l        U R                   R
                  U R                  l        g )Nr(   )r+   r   ÚListenComponentAuthenticatorr	   r/   r   r1   )r   r-   s     r   r8   Ú'ListenComponentAuthenticatorTests.setUpä   sA   € ØˆŒÜ!×>Ò>¸xÓHˆÜ"×,Ò,¨]Ó;ˆŒØ"Ÿk™k×0Ñ0ˆ�‰Õr   c                 ó:   • U R                   R                  S5        g)z1
Stub loseConnection because we are a transport.
z	no reasonN)r	   r‹   r7   s    r   ÚloseConnectionÚ0ListenComponentAuthenticatorTests.loseConnectionê   s   € ð 	�‰×%Ñ% kÕ2r   c                 óè  ^• / mU4S jnU R                   nXl        UR                  U 5        U R                  SUR                  5        U R                  UR                  5        UR                  S5        U R                  SUR                  5        U R                  SUR                  5        U R                  UR                  5        U R                  SUR                  R                  4TS   5        g)z;
The received stream header should set several attributes.
c                 ó*   >• TR                  X45        g r   r–   )ÚeventÚ
observerfnÚ	observerss     €r   ÚaddOnetimeObserverÚPListenComponentAuthenticatorTests.test_streamStarted.<locals>.addOnetimeObserverö   s   ø€ Ø×Ñ˜eÐ0Õ1r   Nzz<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='component.example.org'>)r   r   r«   r;   )r	   rÎ   ÚmakeConnectionÚassertIdenticalr4   ÚassertFalseÚ_headerSentr3   r?   ÚversionÚassertNotIdenticalÚ
assertTruer-   Ú	onElement)r   rÎ   r_   rÍ   s      @r   Útest_streamStartedÚ4ListenComponentAuthenticatorTests.test_streamStartedð   sÄ   ø€ ð ˆ	õ	2ð �^‰^ˆØ 2Ôà
×Ñ˜$ÔØ×Ñ˜T 2§6¡6Ô*Ø×Ñ˜Ÿ™Ô(à
�‰ð*ô	
ð
 	×Ñ˜ §¡Ô,Ø×Ñ  b§f¡fÔ-Ø�‰˜Ÿ™Ô'Ø×Ñ˜$ × 0Ñ 0× :Ñ :Ð;¸YÀr¹]ÕKr   c                 óú   • / nU R                   nUR                  Ul        UR                  U 5        UR	                  S5        U R                  S[        U5      5        U R                  SUS   R                  5        g)z=
The received stream header should have a correct namespace.
zp<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='component.example.org'>rV   zinvalid-namespacer;   N©r	   r   ÚsendStreamErrorrÐ   r3   r?   r¡   Ú	condition©r   ÚstreamErrorsr_   s      r   Ú test_streamStartedWrongNamespaceÚBListenComponentAuthenticatorTests.test_streamStartedWrongNamespace
  sr   € ð ˆà�^‰^ˆØ)×0Ñ0ˆÔØ
×Ñ˜$ÔØ
�‰ð*ô	
ð
 	×Ñ˜œC Ó-Ô.Ø×ÑÐ,¨l¸2Ñ.>×.HÑ.HÕIr   c                 óú   • / nU R                   nUR                  Ul        UR                  U 5        UR	                  S5        U R                  S[        U5      5        U R                  SUS   R                  5        g)z:
The received stream header should have a 'to' attribute.
z_<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams'>rV   zimproper-addressingr;   NrÛ   rÞ   s      r   Útest_streamStartedNoToÚ8ListenComponentAuthenticatorTests.test_streamStartedNoTo  sr   € ð ˆà�^‰^ˆØ)×0Ñ0ˆÔØ
×Ñ˜$ÔØ
�‰ð?ô	
ð 	×Ñ˜œC Ó-Ô.Ø×ÑÐ.°¸RÑ0@×0JÑ0JÕKr   c                 ó  • / nU R                   nUR                  UR                  l        [        R
                  " S5      nUR                  S5        UR                  R                  U5        U R                  SUS   5        g)z,
We expect a handshake element with a hash.
)újabber:component:acceptr<   Ú1234r;   N)	r	   r   r-   ÚonHandshaker   r£   Ú
addContentr×   r?   )r   Ú
handshakesr_   r<   s       r   Útest_onElementÚ0ListenComponentAuthenticatorTests.test_onElement+  sk   € ð ˆ
à�^‰^ˆØ'1×'8Ñ'8ˆ×ÑÔ$ä—N’NÐ#KÓLˆ	Ø×Ñ˜VÔ$Ø
×Ñ×"Ñ" 9Ô-Ø×Ñ˜ ¨B¡Õ0r   c                 ó>  • / n/ nU R                   nUR                  UR                  l        UR                  Ul        [
        R                  " S5      nUR                  R                  U5        U R                  U5        U R                  SUS   R                  5        g)z)
Reject elements that are not handshakes
)ræ   Úmessageúnot-authorizedr;   N)r	   r   r-   rè   rÜ   r   r£   r×   rÒ   r?   rÝ   )r   rê   rß   r_   r—   s        r   Útest_onElementNotHandshakeÚ<ListenComponentAuthenticatorTests.test_onElementNotHandshake9  s†   € ð ˆ
Øˆà�^‰^ˆØ'1×'8Ñ'8ˆ×ÑÔ$Ø)×0Ñ0ˆÔä—.’.Ð!GÓHˆØ
×Ñ×"Ñ" 7Ô+Ø×Ñ˜Ô$Ø×ÑÐ)¨<¸Ñ+;×+EÑ+EÕFr   c                 ó*  ^• / mU4S jnU R                   nUR                  [         R                  U5        SUl        SnUR                  R                  U5        U R                  SU R                  S   5        U R                  S[        T5      5        g)zE
Receiving a handshake matching the secret authenticates the stream.
c                 ó(   >• TR                  U 5        g r   r–   ©r_   Úauthds    €r   ÚauthenticatedÚIListenComponentAuthenticatorTests.test_onHandshake.<locals>.authenticatedO  ó   ø€ Ø�L‰L˜Õr   rç   Ú(32532c0f7dbf1253c095b18b18e36d38d94c1256rW   r;   rV   N)	r	   rÎ   r[   r4   r-   rè   r?   r+   r¡   )r   rö   r_   ÚtheHashrõ   s       @r   Útest_onHandshakeÚ2ListenComponentAuthenticatorTests.test_onHandshakeI  s|   ø€ ð ˆõ	ð �^‰^ˆØ
×Ñœi×:Ñ:¸MÔJØˆŒØ<ˆØ
×Ñ×$Ñ$ WÔ-Ø×Ñ˜¨¯©°R©Ô9Ø×Ñ˜œC ›JÕ'r   c                 óP  ^• / n/ mU4S jnU R                   nUR                  [         R                  U5        UR                  Ul        SUl        SnUR                  R                  U5        U R                  SUS   R                  5        U R                  S[        T5      5        g)z8
Receiving a bad handshake should yield a stream error.
c                 ó(   >• TR                  U 5        g r   r–   rô   s    €r   rö   ÚRListenComponentAuthenticatorTests.test_onHandshakeWrongHash.<locals>.authenticateda  rø   r   rç   rï   r;   r   N)r	   rÎ   r[   r   rÜ   r4   r-   rè   r?   rÝ   r¡   )r   rß   rö   r_   rú   rõ   s        @r   Útest_onHandshakeWrongHashÚ;ListenComponentAuthenticatorTests.test_onHandshakeWrongHashZ  s“   ø€ ð ˆØˆõ	ð �^‰^ˆØ
×Ñœi×:Ñ:¸MÔJØ)×0Ñ0ˆÔàˆŒØˆØ
×Ñ×$Ñ$ WÔ-Ø×ÑÐ)¨<¸Ñ+;×+EÑ+EÔFØ×Ñ˜œC ›JÕ'r   )r+   r	   N)r   r   r    r!   rl   r8   rÇ   rØ   rà   rã   rë   rð   rû   r   r"   r#   r   r   rÁ   rÁ   ß   s8   † ñò1ò3òLò4Jò"Lò 1òGò (õ"(r   rÁ   c                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)ÚXMPPComponentServerFactoryTestsio  z4
Tests for L{component.XMPPComponentServerFactory}.
c                 óø   • [         R                  " 5       U l        [         R                  " U R                  S5      U l        U R                  R                  S 5      U l        [        S5      U R                  l        g )Nr(   úcomponent.example.org)	r   r�   r¥   ÚXMPPComponentServerFactoryÚfactoryr‰   r	   r
   Ú
thisEntityr7   s    r   r8   Ú%XMPPComponentServerFactoryTests.setUpt  sR   € Ü×&Ò&Ó(ˆŒÜ ×;Ò;¸D¿K¹KÈÓRˆŒØŸ™×3Ñ3°DÓ9ˆŒÜ$'Ð(?Ó$@ˆ�‰Õ!r   c                 óœ  • U R                   R                  U R                   [         R                  5        U R                  SU R                   R                  5        U R                  SU R
                  R                  5        U R                  SU R                   R                  5        U R                  SU R                   R                  5        g)zI
A new connection increases the stream serial count. No logs by default.
r   rV   N)	r	   rŠ   ÚSTREAM_CONNECTED_EVENTr?   Úserialr  rÑ   ÚrawDataInFnÚrawDataOutFnr7   s    r   Útest_makeConnectionÚ3XMPPComponentServerFactoryTests.test_makeConnectionz  sŠ   € ð 	�‰×Ñ §¡´	×0PÑ0PÔQØ×Ñ˜˜DŸN™N×1Ñ1Ô2Ø×Ñ˜˜DŸL™L×/Ñ/Ô0Ø×Ñ˜T 4§>¡>×#=Ñ#=Ô>Ø×Ñ˜T 4§>¡>×#>Ñ#>Õ?r   c                 ó&  • SU R                   l        U R                  R                  U R                  [        R                  5        U R                  SU R                  R                  5        U R                  SU R                  R                  5        g)z4
Setting logTraffic should set up raw data loggers.
TN)r  Ú
logTrafficr	   rŠ   r  rÕ   r  r  r7   s    r   Útest_makeConnectionLogTrafficÚ=XMPPComponentServerFactoryTests.test_makeConnectionLogTraffic„  sb   € ð #'ˆ�‰ÔØ�‰×Ñ §¡´	×0PÑ0PÔQØ×Ñ  d§n¡n×&@Ñ&@ÔAØ×Ñ  d§n¡n×&AÑ&AÕBr   c                 óh  • U R                   R                  U R                   [         R                  5         " S S[        5      n[        R
                  " U" 5       5      nU R                   R                  U[         R                  5        U R                  S[        U R                  U5      5      5        g)zA
An observer for stream errors should trigger onError to log it.
c                   ó   • \ rS rSrSrg)Ú?XMPPComponentServerFactoryTests.test_onError.<locals>.TestErrori“  r#   N)r   r   r    r!   r"   r#   r   r   Ú	TestErrorr  “  s   † Úr   r  rV   N)
r	   rŠ   r  Ú	Exceptionr   ÚFailureÚSTREAM_ERROR_EVENTr?   r¡   ÚflushLoggedErrors)r   r  Úreasons      r   Útest_onErrorÚ,XMPPComponentServerFactoryTests.test_onError�  sz   € ð 	�‰×Ñ §¡´	×0PÑ0PÔQô	œ	ô 	ô —’¡£Ó-ˆØ�‰×Ñ ¬	×(DÑ(DÔEØ×Ñ˜œC × 6Ñ 6°yÓ AÓBÕCr   c                 ó  • U R                   R                  U R                   [         R                  5        U R                  SU R                  R
                  5        U R                  U R                   U R                  R
                  S   5        g)z7
Make sure a new stream is added to the routing table.
r  N)r	   rŠ   r[   ÚassertInr¥   r¢   rÑ   r7   s    r   Útest_connectionInitializedÚ:XMPPComponentServerFactoryTests.test_connectionInitializedš  sb   € ð 	�‰×Ñ §¡´	×0LÑ0LÔMØ�‰Ð-¨t¯{©{×/AÑ/AÔBØ×ÑØ�N‰N˜DŸK™K×.Ñ.Ð/FÑGõ	
r   c                 ó  • U R                   R                  U R                   [         R                  5        U R                   R                  S[         R                  5        U R	                  SU R
                  R                  5        g)zE
Make sure a stream is removed from the routing table on disconnect.
Nr  )r	   rŠ   r[   ÚSTREAM_END_EVENTÚassertNotInr¥   r¢   r7   s    r   Útest_connectionLostÚ3XMPPComponentServerFactoryTests.test_connectionLost¤  sW   € ð 	�‰×Ñ §¡´	×0LÑ0LÔMØ�‰×Ñ ¤i×&@Ñ&@ÔAØ×ÑÐ0°$·+±+×2DÑ2DÕEr   )r  r¥   r	   N)r   r   r    r!   rl   r8   r  r  r  r"  r'  r"   r#   r   r   r  r  o  s*   † ñòAò@òCòDò
õFr   r  N)rl   Úhashlibr   Úzope.interface.verifyr   Útwisted.pythonr   Útwisted.trialr   Útwisted.words.protocols.jabberr   r   r	   Ú"twisted.words.protocols.jabber.jidr
   Útwisted.words.xishr   Útwisted.words.xish.utilityr   r   ÚTestCaser%   rJ   rd   rg   rn   r‚   r’   rÁ   r  r#   r   r   Ú<module>r2     sÉ   ðñõ å .å "Ý "ß HÑ HÝ 2Ý %Ý .÷ ñ  ô%¨(×*;Ñ*;ô %ôP2˜×*Ñ*ô 2ô<
0�8×$Ñ$ô 
0ô+˜9×,Ñ,ô +ô > × 1Ñ 1ô >ôD<-�(×#Ñ#ô <-ô~M(¨×(9Ñ(9ô M(ô`;F h×&7Ñ&7õ ;Fr   