+
    üÐj6÷  ã                   ó&  € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t
 ^ RIHt ^ RIHtHt ^ RIHtHtHt ^ RIHtHt ^ RIHtHtHtHt ^ R	IHtHtHt ^ R
I H!t! ^ RI"H#t# ^ RI$H%t% ^ RI&H't'H(t( ^ RI)H*t* ^ RI+H,t,H-t-H.t.H/t/ ^ RI0H1t1  ! R R]-Pd                  4      t3 ! R R]-Ph                  4      t5]! ]Pl                  4       ! R R4      4       t7 ! R R4      t8R t9 ! R R4      t: ! R R]#4      t;RR lt< ! R R ]-Pz                  4      t> ! R! R"]-Pz                  4      t? ! R# R$]-P€                  4      tA ! R% R&]-P„                  4      tC]-Pˆ                  ! ]A]C4        ! R' R(]-P€                  4      tER) tF]-PŽ                  ! ]E]F4        ! R* R+]-Pz                  4      tH ! R, R-]-P’                  4      tJ ! R. R/]-Pz                  4      tK ! R0 R1]-P’                  4      tL ! R2 R3]-Pš                  4      tN]-Pˆ                  ! ]L]N4        ! R4 R5]-Pš                  4      tO]-Pˆ                  ! ]J]O4        ! R6 R7]-Pz                  4      tP ! R8 R9]-Pz                  4      tQ ! R: R;]-Pz                  4      tR ! R< R=]-Pz                  4      tS ! R> R?]-P€                  ]-P„                  4      tT]-Pˆ                  ! ]T]T4        ! R@ RA]-P€                  ]-P„                  4      tU]-Pˆ                  ! ]U]U4        ! RB RC]-P’                  ]-Pš                  4      tV]-Pˆ                  ! ]V]V4        ! RD RE]-P®                  4      tX ! RF RG]-P®                  4      tY ! RH RI]1P´                  4      t[ ! RJ RK]-P¸                  4      t] ! RL RM]1P¼                  4      t_ ! RN RO]1P¼                  4      t`R€taRsbRscRP td ! RQ RR]-Pz                  4      te ! RS RT]-Pz                  4      tf ! RU RV]1P¼                  4      tg ! RW RX].PÐ                  4      ti ! RY RZ].PÔ                  4      tk ! R[ R\]-Pz                  4      tl]-Pˆ                  ! ]i]k4        ! R] R^]1P¼                  4      tm ! R_ R`]n4      to ! Ra Rb]-P€                  4      tp ! Rc Rd]-Pz                  4      tq ! Re Rf]/Pä                  4      ts]! ]-Pè                  4       ! Rg Rh]-Ph                  4      4       tu ! Ri Rj4      tv ! Rk Rl]-Pd                  4      tw ! Rm Rn]v4      tx ! Ro Rp]1P¼                  4      ty ! Rq Rr]1P¼                  4      tz]! ]-Pè                  4       ! Rs Rt4      4       t{ ! Ru Rv]1P¼                  4      t| ! Rw Rx]4      t}]! ]}4       ! Ry Rz4      4       t~ ! R{ R|]1P¼                  4      t ! R} R~]1P¼                  4      t€R# )�z�
Tests for Perspective Broker module.

TODO: update protocol level tests to use new connection API, leaving
only specific tests for old API.
N)Údeque)ÚBytesIO)ÚDict)Ú	InterfaceÚimplementer)ÚcheckersÚcredentialsÚportal)ÚUnauthorizedLoginÚUnhandledCredentials)ÚaddressÚmainÚprotocolÚreactor)ÚDeferredÚgatherResultsÚsucceed)ÚConnectionRefusedError)Ú_FakeConnector)ÚWrappingFactory)ÚfailureÚlog)Ú	iterbytes)ÚjellyÚpbÚpublishÚutil)Úunittestc                   ó&   a € ] tR t^'t o R tRtV tR# )ÚDummyc                ó6   € \        V\        4      '       d   R # R# )zhello world!zgoodbye, cruel world!)Ú
isinstanceÚDummyPerspective©ÚselfÚusers   &&Ú=/usr/lib/python3/dist-packages/twisted/spread/test/test_pb.pyÚview_doNothingÚDummy.view_doNothing(   s   € Ü�dÔ,×-Ò-Ù!á*ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r'   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r&   r   r   '   s   ø‡ € ÷+ð +r)   r   c                   ó*   a € ] tR t^/t o RtR tRtV tR# )r"   z=
An L{IPerspective} avatar which will be used in some tests.
c                ó   € \        4       # ©N)r   ©r$   s   &r&   Úperspective_getDummyViewPointÚ.DummyPerspective.perspective_getDummyViewPoint4   s	   € Ü‹wˆr)   r*   N)r+   r,   r-   r.   Ú__doc__r7   r/   r0   r1   s   @r&   r"   r"   /   s   ø‡ € ñ÷ð r)   r"   c                   ó&   a € ] tR t^8t o R tRtV tR# )Ú
DummyRealmc                ób   € V F(  pV\         P                  J g   K  V\        V4      R  3u # 	  R# )c                  ó   € R # r5   r*   r*   r)   r&   Ú<lambda>Ú*DummyRealm.requestAvatar.<locals>.<lambda>=   s   € Á$r)   N)r   ÚIPerspectiver"   )r$   ÚavatarIdÚmindÚ
interfacesÚifaces   &&&* r&   ÚrequestAvatarÚDummyRealm.requestAvatar:   s+   € ÛˆEØœŸ™Õ'ØÔ.¨xÓ8¹,ÐFÒFó  r)   r*   N)r+   r,   r-   r.   rE   r/   r0   r1   s   @r&   r;   r;   8   s   ø‡ € ÷Gð Gr)   r;   c                   ó<   a € ] tR t^@t o RtR tR tR tR tRt	V t
R# )ÚIOPumpzƒ
Utility to pump data between clients and servers for protocol testing.

Perhaps this is a utility worthy of being in protocol.py?
c                ó6   € Wn         W n        W0n        W@n        R # r5   )ÚclientÚserverÚclientIOÚserverIO)r$   rJ   rK   rL   rM   s   &&&&&r&   Ú__init__ÚIOPump.__init__G   s   € ØŒØŒØ ŒØ Žr)   c                óÜ   € RV n         \        P                  ! 4       ^,           pV P                   '       g7   V P                  4       '       d   \        P                  ! 4       V8”  g   KD  R# R# R# )z£
Pump until there is no more input or output or until L{stop} is called.
This does not run any timers, so don't use it with any code that calls
reactor.callLater.
FN)Ú_stopÚtimeÚpump)r$   Útimeouts   & r&   ÚflushÚIOPump.flushM   sE   € ð ˆŒ
Ü—)’)“+ •/ˆØ—*—*�* §¡§¢Ü�yŠy‹{˜WÖ$Ùñ "-‘*r)   c                ó   € RV n         R# )zL
Stop a running L{flush} operation, even if data remains to be
transferred.
TN)rQ   r6   s   &r&   ÚstopÚIOPump.stopZ   s   € ð
 ˆŽ
r)   c                ó  € V P                   P                  ^ 4       V P                  P                  ^ 4       V P                   P                  4       pV P                  P                  4       pV P                   P                  ^ 4       V P                  P                  ^ 4       V P                   P	                  4        V P                  P	                  4        V P
                  P                  P                  4        V P                  P                  P                  4        \        V4       F  pV P                  P                  V4       K   	  \        V4       F  pV P
                  P                  V4       K   	  V'       g	   V'       d   ^# ^ # )z@
Move data back and forth.

Returns whether any data was moved.
)rL   ÚseekrM   ÚreadÚtruncaterJ   Ú	transportÚ_checkProducerrK   r   ÚdataReceived)r$   ÚcDataÚsDataÚbytes   &   r&   rS   ÚIOPump.pumpa   s	  € ð 	�‰×Ñ˜1ÔØ�‰×Ñ˜1ÔØ—‘×"Ñ"Ó$ˆØ—‘×"Ñ"Ó$ˆØ�‰×Ñ˜1ÔØ�‰×Ñ˜1ÔØ�‰×ÑÔ Ø�‰×ÑÔ Ø�‰×Ñ×,Ñ,Ô.Ø�‰×Ñ×,Ñ,Ô.Ü˜eÖ$ˆDØ�K‰K×$Ñ$ TÖ*ñ %ä˜eÖ$ˆDØ�K‰K×$Ñ$ TÖ*ñ %ç—EÙár)   )rQ   rJ   rL   rK   rM   N)r+   r,   r-   r.   r9   rN   rU   rX   rS   r/   r0   r1   s   @r&   rH   rH   @   s#   ø‡ € ñò!òò÷ð r)   rH   c                óÀ  a€ RpSP                  V4      pVP                  V4      p\        4       p\        4       pVP                  \        P                  ! V4      4       VP                  \        P                  ! V4      4       \        WEWg4      pR p	V3R lp
V P                  W”4       V P                  W•4       V P                  V
4       VP                  4        WEV3# )a8  
Create a server and a client and connect the two with an
L{IOPump}.

@param test: the test case where the client and server will be
    used.
@type test: L{twisted.trial.unittest.TestCase}

@param clientFactory: The factory that creates the client object.
@type clientFactory: L{twisted.spread.pb.PBClientFactory}

@param serverFactory: The factory that creates the server object.
@type serverFactory: L{twisted.spread.pb.PBServerFactory}

@return: a 3-tuple of (client, server, pump)
@rtype: (L{twisted.spread.pb.Broker}, L{twisted.spread.pb.Broker},
    L{IOPump})
c                 ó”   € V P                   '       g6   V P                  \        P                  ! \        P
                  4      4       R # R # r5   )ÚdisconnectedÚconnectionLostr   ÚFailurer   ÚCONNECTION_DONE)Úbrokers   &r&   ÚmaybeDisconnectÚ/connectServerAndClient.<locals>.maybeDisconnect™   s0   € Ø×"×"Ð"Ø×!Ñ!¤'§/¢/´$×2FÑ2FÓ"GÖHñ #r)   c                  ór   <€ S P                  R \        P                  ! \        P                  4      R7       R # )N)Ú	connectorÚreason)ÚclientConnectionLostr   ri   r   rj   )ÚclientFactorys   €r&   ÚdisconnectClientFactoryÚ7connectServerAndClient.<locals>.disconnectClientFactory�   s,   ø€ ð
 	×*Ñ*Ø¤7§?¢?´4×3GÑ3GÓ#Hð 	+ö 	
r)   )ú	127.0.0.1)ÚbuildProtocolÚStringIOÚmakeConnectionr   ÚFileWrapperrH   Ú
addCleanuprS   )Útestrr   ÚserverFactoryÚaddrÚclientBrokerÚserverBrokerÚclientTransportÚserverTransportrS   rl   rs   s   &f&        r&   ÚconnectServerAndClientr‚   {   s¼   ø€ ð& €DØ ×.Ñ.¨tÓ4€LØ ×.Ñ.¨tÓ4€Lä“j€OÜ“j€Oà×Ñ¤× 4Ò 4°_Ó EÔFØ×Ñ¤× 4Ò 4°_Ó EÔFÜ�,¨oÓO€DòIõ
ð 	‡O�O�OÔ2Ø‡O�O�OÔ2Ø‡O�OÐ+Ô,à‡I�I„KØ tÐ+Ð+r)   c                   ó6   a € ] tR t^®t o RtR tR tR tRtV t	R# )Ú_ReconnectingFakeConnectorStatezÐ
Manages connection notifications for a
L{_ReconnectingFakeConnector} instance.

@ivar notifications: pending L{Deferreds} that will fire when the
    L{_ReconnectingFakeConnector}'s connect method is called
c                ó$   € \        4       V n        R # r5   )r   Únotificationsr6   s   &r&   rN   Ú(_ReconnectingFakeConnectorState.__init__·   s   € Ü"›WˆÖr)   c                óP   € \        4       pV P                  P                  V4       V# )z²
Connection notification.

@return: A L{Deferred} that fires when this instance's
    L{twisted.internet.interfaces.IConnector.connect} method
    is called.
@rtype: L{Deferred}
)r   r†   Ú
appendleft)r$   Únotifiers   & r&   ÚnotifyOnConnectÚ/_ReconnectingFakeConnectorState.notifyOnConnectº   s$   € ô “:ˆØ×Ñ×%Ñ% hÔ/Øˆr)   c                ó€   € V P                   '       d,   V P                   P                  4       P                  V 4       K=  R# )z!
Fire all pending notifications.
N)r†   ÚpopÚcallbackr6   s   &r&   Ú	notifyAllÚ)_ReconnectingFakeConnectorState.notifyAllÇ   s2   € ð × × Ð Ø×Ñ×"Ñ"Ó$×-Ñ-¨dÖ3ñ !r)   )r†   N)
r+   r,   r-   r.   r9   rN   r‹   r�   r/   r0   r1   s   @r&   r„   r„   ®   s   ø‡ € ñò%ò÷4ð 4r)   r„   c                   óB   a a€ ] tR t^Ït oRtV 3R ltV 3R ltRtVtV ;t	# )Ú_ReconnectingFakeConnectorzW
A fake L{IConnector} that can fire L{Deferred}s when its
C{connect} method is called.
c                ó2   <€ \         SV `  V4       W n        R# )zÕ
@param address: An L{IAddress} provider that represents this
    connector's destination.
@type address: An L{IAddress} provider.

@param state: The state instance
@type state: L{_ReconnectingFakeConnectorState}
N)ÚsuperrN   Ú_state)r$   r   ÚstateÚ	__class__s   &&&€r&   rN   Ú#_ReconnectingFakeConnector.__init__Õ   s   ø€ ô 	‰Ñ˜Ô!ØŽr)   c                óX   <€ \         SV `  4        V P                  P                  4        R# )z=
A C{connect} implementation that calls C{reconnectCallback}
N)r•   Úconnectr–   r�   )r$   r˜   s   &€r&   r›   Ú"_ReconnectingFakeConnector.connectá   s   ø€ ô 	‰‰ÔØ�‰×ÑÖr)   )r–   )
r+   r,   r-   r.   r9   rN   r›   r/   r0   Ú__classcell__)r˜   r2   s   @@r&   r“   r“   Ï   s   ù‡ € ñõ

÷ õ  r)   r“   c                óð   € T;'       g    \        4       p\        P                  ! RR7      p\        P                  ! \
        P                  ! W.4      4      p\        P                  ! 4       p\        WV4      # )zª
Connect a client and server L{Broker} together with an L{IOPump}

@param realm: realm to use, defaulting to a L{DummyRealm}

@returns: a 3-tuple (client, server, pump).
ó   guest)Úguest)	r;   r   Ú'InMemoryUsernamePasswordDatabaseDontUser   ÚPBServerFactoryr	   ÚPortalÚPBClientFactoryr‚   )r{   ÚrealmÚcheckerr|   rr   s   &&   r&   ÚconnectedServerAndClientr§   é   sY   € ð ×!Ð!”Z“\€EÜ×>Ò>ÀXÔN€GÜ×&Ò&¤v§}¢}°U¸IÓ'FÓG€MÜ×&Ò&Ó(€MÜ! $°}ÓEÐEr)   c                   ó,   a € ] tR t^øt o R tR tRtV tR# )ÚSimpleRemotec                ó    € Wn         V^,           # ©é   ©Úarg©r$   r®   s   &&r&   Úremote_thunkÚSimpleRemote.remote_thunkù   ó   € ØŒØ�Q�wˆr)   c                ó   € \        4       hr5   )Ú	Exceptionr¯   s   &&r&   Úremote_knuthÚSimpleRemote.remote_knuthý   s
   € Ü‹kÐr)   r­   N)r+   r,   r-   r.   r°   rµ   r/   r0   r1   s   @r&   r©   r©   ø   s   ø‡ € ò÷ð r)   r©   c                   ó&   a € ] tR tRt o R tRtV tR# )ÚNestedRemotei  c                ó   € \        4       # r5   )r©   r6   s   &r&   Úremote_getSimpleÚNestedRemote.remote_getSimple  s
   € Ü‹~Ðr)   r*   N)r+   r,   r-   r.   rº   r/   r0   r1   s   @r&   r¸   r¸     s   ø‡ € ÷ð r)   r¸   c                   ó&   a € ] tR tRt o R tRtV tR# )Ú
SimpleCopyi  c                ó6   € ^V n         RR/V n        R.V n        R# ©r¬   ÚHelloÚWorldr{   N©ÚxÚyÚzr6   s   &r&   rN   ÚSimpleCopy.__init__  ó   € ØˆŒØ˜7Ð#ˆŒØ�ˆŽr)   rÂ   N©r+   r,   r-   r.   rN   r/   r0   r1   s   @r&   r½   r½     ó   ø‡ € ÷ð r)   r½   c                   ó   € ] tR tRtRtR# )ÚSimpleLocalCopyi  r*   N©r+   r,   r-   r.   r/   r*   r)   r&   rË   rË     ó   † Ûr)   rË   c                   ó:   a € ] tR tRt o Rt/ tR tV 3R ltRtV t	R# )ÚSimpleFactoryCopyi  zQ
@cvar allIDs: hold every created instances of this class.
@type allIDs: C{dict}
c                ó8   € Wn         V \        P                  V&   R # r5   )ÚidrÏ   ÚallIDs)r$   rÑ   s   &&r&   rN   ÚSimpleFactoryCopy.__init__  s   € ØŒØ'+Ô× Ñ  Ó$r)   c                ó:   <€ V ^8„  d   Qh/ S[ S[R3,          ;R&   # )é   rÏ   rÒ   )r   Úint)Úformatr2   s   "€r&   Ú__annotate__ÚSimpleFactoryCopy.__annotate__  s   ø‡ ‚ ñ ‘Ð)Ð)Õ*Ñ/ò r)   )rÑ   N)
r+   r,   r-   r.   r9   rÒ   rN   Ú__annotate_func__r/   r0   r1   s   @r&   rÏ   rÏ     s   ø‡ € ñð
 .0€Fò,÷ ƒ r)   rÏ   c                ó  € V P                  RR4      pVf   \        R\        V 4       24      hV\        P                  9  d   \        R\        P                   24      h\        P                  V,          pV'       g   \        R4      hV# )z`
Factory of L{SimpleFactoryCopy}, getting a created instance given the
C{id} found in C{state}.
rÑ   Nz&factory copy state has no 'id' member zfactory class has no ID: z&factory method found no object with id)ÚgetÚRuntimeErrorÚreprrÏ   rÒ   )r—   ÚstateIdÚinsts   &  r&   ÚcreateFactoryCopyrá   !  s~   € ð
 �i‰i˜˜dÓ#€GØ‚ÜÐCÄDÈÃKÀ=ÐQÓRÐRØÔ'×.Ñ.Ô.ÜÐ6Ô7H×7OÑ7OÐ6PÐQÓRÐRÜ×#Ñ# GÕ,€DßÜÐCÓDÐDØ€Kr)   c                   ó,   a € ] tR tRt o R tR tRtV tR# )Ú
NestedCopyi4  c                ó   € \        4       # r5   )r½   r6   s   &r&   Úremote_getCopyÚNestedCopy.remote_getCopy5  s
   € Ü‹|Ðr)   c                ó   € \        V4      # r5   )rÏ   )r$   Úvalues   &&r&   Úremote_getFactoryÚNestedCopy.remote_getFactory8  s   € Ü  Ó'Ð'r)   r*   N)r+   r,   r-   r.   rå   ré   r/   r0   r1   s   @r&   rã   rã   4  s   ø‡ € ò÷(ð (r)   rã   c                   ó&   a € ] tR tRt o R tRtV tR# )ÚSimpleCachei<  c                ó6   € ^V n         RR/V n        R.V n        R# r¿   rÂ   r6   s   &r&   Ú	__init___ÚSimpleCache.__init___=  rÇ   r)   rÂ   N)r+   r,   r-   r.   rî   r/   r0   r1   s   @r&   rì   rì   <  rÉ   r)   rì   c                   ó,   a € ] tR tRt o R tR tRtV tR# )ÚNestedComplicatedCacheiC  c                ó$   € \        4       V n        R # r5   )ÚVeryVeryComplicatedCacheableÚcr6   s   &r&   rN   ÚNestedComplicatedCache.__init__D  s   € Ü-Ó/ˆŽr)   c                ó   € V P                   # r5   ©rô   r6   s   &r&   Úremote_getCacheÚ&NestedComplicatedCache.remote_getCacheG  s   € Ø�v‰vˆr)   r÷   N)r+   r,   r-   r.   rN   rø   r/   r0   r1   s   @r&   rñ   rñ   C  s   ø‡ € ò0÷ð r)   rñ   c                   ó8   a € ] tR tRt o R tR tR tR tRtV t	R# )ró   iK  c                ó0   € ^V n         ^V n        ^V n        R# ©r¬   N©rÃ   rÄ   Úfoor6   s   &r&   rN   Ú%VeryVeryComplicatedCacheable.__init__L  s   € ØˆŒØˆŒØˆŽr)   c                óL   € ^V n         V P                  P                  R^4       R# )é   rþ   N)rþ   ÚobserverÚ
callRemoter6   s   &r&   ÚsetFoo4Ú$VeryVeryComplicatedCacheable.setFoo4Q  s   € ØˆŒØ�‰× Ñ  ¨Ö*r)   c                óZ   € W n         R V P                  RV P                  RV P                  /# rý   )r  rÃ   rÄ   rþ   ©r$   Úperspectiver  s   &&&r&   ÚgetStateToCacheAndObserveForÚ9VeryVeryComplicatedCacheable.getStateToCacheAndObserveForU  s&   € Ø ŒØ�T—V‘V˜S $§&¡&¨%°·±Ð:Ð:r)   c                ó†   € \         P                  ! R 4       VP                  R4       W P                  8X  d
   RV n        R# R# )zstopped observingÚendN)r   Úmsgr  r  r  s   &&&r&   ÚstoppedObservingÚ-VeryVeryComplicatedCacheable.stoppedObservingY  s3   € Ü�ŠÐ#Ô$Ø×Ñ˜EÔ"Ø—}‘}Ô$Ø ˆDŽMñ %r)   )rþ   r  rÃ   rÄ   N)
r+   r,   r-   r.   rN   r  r	  r  r/   r0   r1   s   @r&   ró   ró   K  s   ø‡ € òò
+ò;÷!ð !r)   ró   c                   ó,   a € ] tR tRt o R tR tRtV tR# )ÚRatherBaroqueCachei`  c                ó   € Wn         R # r5   ©rþ   )r$   ÚnewFoos   &&r&   Úobserve_fooÚRatherBaroqueCache.observe_fooa  s   € ØŽr)   c                ó2   € \         P                  ! R 4       R# )zthe end of thingsN)r   r  r6   s   &r&   Úobserve_endÚRatherBaroqueCache.observe_endd  s   € Ü�ŠÐ#Ö$r)   r  N)r+   r,   r-   r.   r  r  r/   r0   r1   s   @r&   r  r  `  s   ø‡ € ò÷%ð %r)   r  c                   ó8   a € ] tR tRt o R tR tR tR tRtV t	R# )ÚSimpleLocalCacheik  c                ó<   € V P                   P                  V4       R # r5   )Ú__dict__Úupdate)r$   r—   s   &&r&   ÚsetCopyableStateÚ!SimpleLocalCache.setCopyableStatel  s   € Ø�‰×Ñ˜UÖ#r)   c                ó   € V P                   # r5   ©Úcheckr6   s   &r&   ÚcheckMethodÚSimpleLocalCache.checkMethodo  ó   € Ø�z‰zÐr)   c                ó   € V # r5   r*   r6   s   &r&   Ú	checkSelfÚSimpleLocalCache.checkSelfr  s   € Øˆr)   c                ó   € ^# r«   r*   r6   s   &r&   r#  ÚSimpleLocalCache.checku  s   € Ùr)   r*   N)
r+   r,   r-   r.   r  r$  r(  r#  r/   r0   r1   s   @r&   r  r  k  s   ø‡ € ò$òò÷ð r)   r  c                   ó2   a € ] tR tRt o R tR tR tRtV tR# )ÚNestedCachei|  c                ó$   € \        4       V n        R # r5   )rì   rÃ   r6   s   &r&   rN   ÚNestedCache.__init__}  s   € Ü“ˆŽr)   c                ó2   € V P                   V P                   .# r5   ©rÃ   r6   s   &r&   rø   ÚNestedCache.remote_getCache€  s   € Ø—‘˜Ÿ™ÐÐr)   c                ó   € V P                   VJ # r5   r1  ©r$   Úcaches   &&r&   Úremote_putCacheÚNestedCache.remote_putCacheƒ  s   € Ø�v‰v˜ˆÐr)   r1  N)	r+   r,   r-   r.   rN   rø   r6  r/   r0   r1   s   @r&   r-  r-  |  s   ø‡ € òò ÷ð r)   r-  c                   ó8   a € ] tR tRt o R tR tR tR tRtV t	R# )Ú
Observablei‡  c                ó   € . V n         R # r5   ©Ú	observersr6   s   &r&   rN   ÚObservable.__init__ˆ  s	   € ØˆŽr)   c                ó<   € V P                   P                  V4       R # r5   )r<  Úappend©r$   Úobss   &&r&   Úremote_observeÚObservable.remote_observe‹  ó   € Ø�‰×Ñ˜cÖ"r)   c                ó<   € V P                   P                  V4       R # r5   )r<  Úremover@  s   &&r&   Úremote_unobserveÚObservable.remote_unobserveŽ  rD  r)   c                óP   € V P                    F  pVP                  R W4       K  	  R# )ÚnotifyN)r<  r  )r$   Úobjr  s   && r&   rJ  ÚObservable.notify‘  s    € ØŸœˆHØ×Ñ ¨$Ö4ó 'r)   r;  N)
r+   r,   r-   r.   rN   rB  rG  rJ  r/   r0   r1   s   @r&   r9  r9  ‡  s   ø‡ € òò#ò#÷5ð 5r)   r9  c                   ó8   a € ] tR tRt o R tR tR tR tRtV t	R# )ÚDeferredRemotei–  c                ó   € ^ V n         R# )é    N©Úrunr6   s   &r&   rN   ÚDeferredRemote.__init__—  s	   € ØˆŽr)   c                ó    € Wn         V^,           # r«   rQ  r¯   s   &&r&   ÚrunMeÚDeferredRemote.runMeš  r²   r)   c                ó   € Q R4       h)rP  zshouldn't have been run!r*   r¯   s   &&r&   Ú	dontRunMeÚDeferredRemote.dontRunMež  s   € Ø,Ð,Ó,ˆqr)   c                ór   € \        4       pVP                  V P                  V P                  4       Wn        V# )zW
Return a L{Deferred} to be fired on client side. When fired,
C{self.runMe} is called.
)r   ÚaddCallbacksrU  rX  Úd)r$   r\  s   & r&   Úremote_doItLaterÚDeferredRemote.remote_doItLater¡  s+   € ô
 ‹JˆØ	�‰�t—z‘z 4§>¡>Ô2ØŒØˆr)   )r\  rR  N)
r+   r,   r-   r.   rN   rU  rX  r]  r/   r0   r1   s   @r&   rN  rN  –  s   ø‡ € òòò-÷ð r)   rN  c                   ó.   a € ] tR tRt o ^ tRtR tRtV tR# )ÚObserveri¬  Nc                óf   € W n         V P                  ^,           V n        VP                  RV 4       R# )r¬   Ú	unobserveN)rK  Únotifiedr  )r$   ÚotherrK  s   &&&r&   Úremote_notifyÚObserver.remote_notify°  s'   € ØŒØŸ™¨Õ)ˆŒØ×Ñ˜ dÖ+r)   )rc  rK  )	r+   r,   r-   r.   rc  rK  re  r/   r0   r1   s   @r&   r`  r`  ¬  s   ø‡ € Ø€HØ
€C÷,ð ,r)   r`  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚNewStyleCopyi¶  c                ó   € Wn         R # r5   ©Ús)r$   rk  s   &&r&   rN   ÚNewStyleCopy.__init__·  s   € ØŽr)   rj  NrÈ   r1   s   @r&   rh  rh  ¶  s   ø‡ € ÷ð r)   rh  c                   ó8   a € ] tR tRt o ^ t^ t^tR tR tRt	V t
R# )ÚNewStyleCopy2i¾  c                óx   € \         ;P                  ^,          un        \        P                  V 4      p^Vn        V# r«   )rn  Ú	allocatedÚobjectÚ__new__rè   )r$   rà   s   & r&   rr  ÚNewStyleCopy2.__new__Ã  s-   € Ü×Ò 1Õ$ÕÜ�~‰~˜dÓ#ˆØˆŒ
Øˆr)   c                ó@   € \         ;P                  ^,          un        R# rü   )rn  Úinitializedr6   s   &r&   rN   ÚNewStyleCopy2.__init__É  s   € Ü×!Ò! QÕ&×!r)   r*   N)r+   r,   r-   r.   rp  ru  rè   rr  rN   r/   r0   r1   s   @r&   rn  rn  ¾  s#   ø‡ € Ø€IØ€KØ€Eò÷'ð 'r)   rn  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚNewStyleCacheCopyiÐ  c                ó   € V P                   # r5   )r  r  s   &&&r&   r	  Ú.NewStyleCacheCopy.getStateToCacheAndObserveForÑ  s   € Ø�}‰}Ðr)   r*   N)r+   r,   r-   r.   r	  r/   r0   r1   s   @r&   rx  rx  Ð  s   ø‡ € ÷ð r)   rx  c                   ó,   a € ] tR tRt o R tR tRtV tR# )ÚEchoeriØ  c                ó   € V# r5   r*   ©r$   Ústs   &&r&   Úremote_echoÚEchoer.remote_echoÙ  s   € Øˆ	r)   c                ó   € W3# r5   r*   )r$   r  Úkws   &&,r&   Úremote_echoWithKeywordsÚEchoer.remote_echoWithKeywordsÜ  s	   € Øˆxˆr)   r*   N)r+   r,   r-   r.   r€  r„  r/   r0   r1   s   @r&   r|  r|  Ø  s   ø‡ € ò÷ð r)   r|  c                   ó,   a € ] tR tRt o R tR tRtV tR# )ÚCachedReturnerià  c                ó   € Wn         R # r5   ©r5  r4  s   &&r&   rN   ÚCachedReturner.__init__á  s   € ØŽ
r)   c                ó   € V P                   # r5   r‰  r~  s   &&r&   Úremote_giveMeCacheÚ!CachedReturner.remote_giveMeCacheä  r&  r)   r‰  N)r+   r,   r-   r.   rN   rŒ  r/   r0   r1   s   @r&   r‡  r‡  à  s   ø‡ € ò÷ð r)   r‡  c                   ó>   a € ] tR tRt o R tR tR tR tR tRt	V t
R# )	ÚNewStyleTestsiè  c                ó  € \         P                  ! \        4       4      V n        \         P                  ! 4       p\        WV P                  R7      w  q n        V n        V P                  VP                  4       4      V n
        R# )zI
Create a pb server using L{Echoer} protocol and connect a client to it.
)r{   rr   r|   N)r   r¢   r|  r|   r¤   r‚   rK   rS   ÚsuccessResultOfÚgetRootObjectÚref)r$   rr   rJ   s   &  r&   ÚsetUpÚNewStyleTests.setUpé  sb   € ô  ×/Ò/´³Ó9ˆÔÜ×*Ò*Ó,ˆÜ)?ØÀ$×BTÑBTô*
Ñ&ˆ”˜TœYð ×'Ñ'¨×(CÑ(CÓ(EÓFˆŽr)   c                óH   € ^ \         n        ^ \         n        ^\         n        R# )zX
Close client and server connections, reset values of L{NewStyleCopy2}
class variables.
N)rn  rp  ru  rè   r6   s   &r&   ÚtearDownÚNewStyleTests.tearDownô  s   € ð
 #$ŒÔØ$%ŒÔ!ØŒÖr)   c                ó¼   a a€ \        R4      oS P                  P                  RS4      pS P                  P	                  4        VV 3R lpVP                  V4       V# )zI
Create a new style object, send it over the wire, and check the result.
rè   Úechoc                 ó’   <€ SP                  V \        4       SP                  V P                  R 4       SP	                  V SJ 4       R# )rè   N)ÚassertIsInstancerh  ÚassertEqualrk  ÚassertFalse©ÚresÚorigr$   s   &€€r&   ÚcbÚ'NewStyleTests.test_newStyle.<locals>.cb  s9   ø€ Ø×!Ñ! #¤|Ô4Ø×Ñ˜SŸU™U GÔ,Ø×Ñ˜S D˜[Ö)r)   ©rh  r“  r  rS   rU   ÚaddCallback©r$   r\  r¢  r¡  s   f  @r&   Útest_newStyleÚNewStyleTests.test_newStyleý  sK   ù€ ô ˜GÓ$ˆØ�H‰H×Ñ ¨Ó-ˆØ�	‰	�‰Ôö	*ð
 	
�‰�bÔØˆr)   c                ó:  a a€ \        4       oS P                  \         P                  ^4       S P                  \         P                  ^4       S P                  P                  RS4      pS P                  P                  4        VV 3R lpVP                  V4       V# )z>
Send a new style object and check the number of allocations.
rš  c                 ó  <€ SP                  V \        4       SP                  V P                  ^4       SP                  \        P                  ^4       SP                  \        P
                  ^4       SP                  V S4       R# ©rÕ   N)rœ  rn  r�  rè   rp  ru  ÚassertIsNotrŸ  s   &€€r&   r¢  Ú$NewStyleTests.test_alloc.<locals>.cb  sc   ø€ à×!Ñ! #¤}Ô5Ø×Ñ˜SŸY™Y¨Ô*Ø×Ñœ]×4Ñ4°aÔ8Ø×Ñœ]×6Ñ6¸Ô:Ø×Ñ˜S $Ö'r)   )	rn  r�  rp  ru  r“  r  rS   rU   r¥  r¦  s   f  @r&   Ú
test_allocÚNewStyleTests.test_alloc  st   ù€ ô ‹ˆØ×Ñœ×0Ñ0°!Ô4Ø×Ñœ×2Ñ2°AÔ6Ø�H‰H×Ñ ¨Ó-ˆØ�	‰	�‰Ôö	(ð 	
�‰�bÔØˆr)   c                óÂ   a a€ \        R4      oS P                  P                  RSRRR7      pS P                  P	                  4        VV 3R lpVP                  V4       V# )zW
Create a new style object with keywords,
send it over the wire, and check the result.
Úvalue1ÚechoWithKeywordsÚoneÚtwo)Úkeyword1Úkeyword2c                 óZ  <€ SP                  V \        4       SP                  V ^ ,          \        4       SP                  V ^,          \        4       SP	                  V ^ ,          P
                  R4       SP                  V ^ ,          S4       SP	                  V ^,          RRRR/4       R# )rP  r±  rµ  r³  r¶  r´  N)rœ  Útuplerh  Údictr�  rk  r¬  rŸ  s   &€€r&   r¢  Ú3NewStyleTests.test_newStyleWithKeywords.<locals>.cb.  s„   ø€ Ø×!Ñ! #¤uÔ-Ø×!Ñ! # a¥&¬,Ô7Ø×!Ñ! # a¥&¬$Ô/Ø×Ñ˜S �VŸX™X xÔ0Ø×Ñ˜S �V TÔ*Ø×Ñ˜S �V j°%¸ÀUÐ%KÖLr)   r¤  r¦  s   f  @r&   Útest_newStyleWithKeywordsÚ'NewStyleTests.test_newStyleWithKeywords#  sZ   ù€ ô
 ˜HÓ%ˆØ�H‰H×ÑØ ¨u¸uð  ó 
ˆð 	�	‰	�‰Ôö	Mð 	
�‰�bÔØˆr)   )rS   r“  rK   r|   N)r+   r,   r-   r.   r”  r—  r§  r®  r»  r/   r0   r1   s   @r&   r�  r�  è  s$   ø‡ € ò	Gò òò ÷,ð r)   r�  c                   ó4   a € ] tR tRt o RtRtR tR tRtV t	R# )ÚConnectionNotifyServerFactoryi:  aJ  
A server factory which stores the last connection and fires a
L{Deferred} on connection made. This factory can handle only one
client connection.

@ivar protocolInstance: the last protocol instance.
@type protocolInstance: C{pb.Broker}

@ivar connectionMade: the deferred fired upon connection.
@type connectionMade: C{Deferred}
Nc                ób   € \         P                  P                  W4       \        4       V n        R# )z
Initialize the factory.
N)r   r¢   rN   r   ÚconnectionMade)r$   Úroots   &&r&   rN   Ú&ConnectionNotifyServerFactory.__init__I  s"   € ô 	×Ñ×#Ñ# DÔ/Ü&›jˆÖr)   c                óf   € Wn         V P                  Ruq n        Ve   VP                  R4       R# R# )z6
Store the protocol and fire the connection deferred.
N)ÚprotocolInstancerÀ  r�   )r$   r   r\  s   && r&   ÚclientConnectionMadeÚ2ConnectionNotifyServerFactory.clientConnectionMadeP  s3   € ð !)ÔØ!%×!4Ñ!4°dÐˆÔØŠ=Ø�J‰J�tÖñ r)   )rÀ  rÄ  )
r+   r,   r-   r.   r9   rÄ  rN   rÅ  r/   r0   r1   s   @r&   r¾  r¾  :  s!   ø‡ € ñ
ð Ðò)÷ð r)   r¾  c                   ó2   a € ] tR tRt o R tR tR tRtV tR# )ÚNewStyleCachedTestsiZ  c                óô  a € \        4       S n        RS P                  n        \        P                  ! ^ \        \        S P                  4      4      4      S n        \        P                  ! 4       p\        P                  ! RS P                  P                  4       P                  V4       V 3R lpVP                  4       P                  V4      pS P                  P                  P                   p\#        W4.4      # )zQ
Create a pb server using L{CachedReturner} protocol and connect a
client to it.
rè   Ú	localhostc                 ó   <€ V Sn         R # r5   )r“  )r“  r$   s   &€r&   ÚgotRootÚ*NewStyleCachedTests.setUp.<locals>.gotRooth  s
   ø€ ØˆDŽHr)   )rx  r¡  rk  r   Ú	listenTCPr¾  r‡  rK   r   r¤   Ú
connectTCPÚgetHostÚportr’  r¥  ÚfactoryrÀ  r   )r$   rr   rÌ  Úd1Úd2s   f    r&   r”  ÚNewStyleCachedTests.setUp[  s·   ø€ ô
 &Ó'ˆŒ	Øˆ�	‰	ŒÜ×'Ò'ØÔ,¬^¸D¿I¹IÓ-FÓGó
ˆŒô ×*Ò*Ó,ˆÜ×Ò˜;¨¯©×(;Ñ(;Ó(=×(BÑ(BÀMÔRõ	ð ×(Ñ(Ó*×6Ñ6°wÓ?ˆØ�[‰[× Ñ ×/Ñ/ˆÜ˜b˜XÓ&Ð&r)   c                ó  € V P                   P                  P                  P                  P	                  4        V P
                  P                  P                  P	                  4        V P                   P                  4       # )z&
Close client and server connections.
)rK   rÒ  rÄ  r^   ÚloseConnectionr“  rk   ÚstopListeningr6   s   &r&   r—  ÚNewStyleCachedTests.tearDowno  sS   € ð 	�‰×Ñ×,Ñ,×6Ñ6×EÑEÔGØ�‰�‰×!Ñ!×0Ñ0Ô2Ø�{‰{×(Ñ(Ó*Ð*r)   c                ó¨   a € S P                   P                  RS P                  4      pV 3R lpVP                  VR4       VP                  VR4       V# )z­
A new-style cacheable object can be retrieved and re-retrieved over a
single connection.  The value of an attribute of the cacheable can be
accessed on the receiving side.
ÚgiveMeCachec                 ó  <€ SP                  V \        4       SP                  R V P                  4       SP	                  SP
                  V 4       V'       d.   V Sn        SP                  P                  RSP
                  4      # R# )rè   rÛ  N)	rœ  rx  r�  rk  r¬  r¡  r   r“  r  )r   Úagainr$   s   &&€r&   r¢  Ú2NewStyleCachedTests.test_newStyleCache.<locals>.cb  sh   ø€ Ø×!Ñ! #Ô'8Ô9Ø×Ñ˜W c§e¡eÔ,à×Ñ˜TŸY™Y¨Ô,çà�”ð —x‘x×*Ñ*¨=¸$¿)¹)ÓDÐDñ r)   TF)r“  r  r¡  r¥  )r$   r\  r¢  s   f  r&   Útest_newStyleCacheÚ&NewStyleCachedTests.test_newStyleCachew  sH   ø€ ð �H‰H×Ñ ¨t¯y©yÓ9ˆõ	Eð 	
�‰�b˜$ÔØ	�‰�b˜%Ô Øˆr)   )r¡  r“  r   rK   N)	r+   r,   r-   r.   r”  r—  rß  r/   r0   r1   s   @r&   rÈ  rÈ  Z  s   ø‡ € ò'ò(+÷ð r)   rÈ  c                   óŠ   a € ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tRtV tR# )ÚBrokerTestsi‘  Nc                óX   €  \         P                  ! R 4       R#   \         d     R# i ; i)úNone-None-TESTING.pubN)ÚosÚunlinkÚOSErrorr6   s   &r&   r—  ÚBrokerTests.tearDown”  s&   € ð	ä�IŠIÐ-Ö.øÜô 	Úð	ús   ‚ š)¨)c                ó.   € V P                  R V 24       R# )z&This should cause a return value, not N©Úfail)r$   Úerrors   &&r&   ÚthunkErrorBadÚBrokerTests.thunkErrorBad›  s   € Ø�	‰	Ð:¸5¸'ÐBÖCr)   c                ó   € Wn         R # r5   )ÚthunkResult©r$   Úresults   &&r&   ÚthunkResultGoodÚBrokerTests.thunkResultGoodž  s   € Ø!Ör)   c                ó   € R # r5   r*   )r$   Útbs   &&r&   ÚthunkErrorGoodÚBrokerTests.thunkErrorGood¡  ó   € Ùr)   c                ó.   € V P                  R V 24       R# )z This should cause an error, not Nrê  rñ  s   &&r&   ÚthunkResultBadÚBrokerTests.thunkResultBad¤  s   € Ø�	‰	Ð4°V°HÐ=Ö>r)   c                ó  € \        V R 7      w  rp ! R R\        P                  4      p ! R R\        P                  4      pVP                  RV! 4       4       VP	                  R4      pV! 4       pV! 4       pVP                  RWx4       VP                  4        VP                  4        VP                  4        V P                  VP                  VR4       V P                  VP                  R4      VP                  R4      4       R# )	©r{   c                   ó&   a € ] tR tRt o R tRtV tR# )Ú%BrokerTests.test_reference.<locals>.Xiª  c                ó   € Wn         R # r5   ©Úcaughtr¯   s   &&r&   Úremote_catchÚ2BrokerTests.test_reference.<locals>.X.remote_catch«  s   € Ø!–r)   r  N)r+   r,   r-   r.   r  r/   r0   r1   s   @r&   ÚXr   ª  s   ø‡ € ÷"ð "r)   r  c                   ó&   a € ] tR tRt o R tRtV tR# )Ú%BrokerTests.test_reference.<locals>.Yi®  c                ó*   € VP                  R V4       R# )ÚcatchN©r  ©r$   ÚaÚbs   &&&r&   Úremote_throwÚ2BrokerTests.test_reference.<locals>.Y.remote_throw¯  s   € Ø—‘˜W aÖ(r)   r*   N)r+   r,   r-   r.   r  r/   r0   r1   s   @r&   ÚYr  ®  s   ø‡ € ÷)ð )r)   r  rÄ   ÚthrowzX should have caught ZN)r§   r   ÚReferenceableÚsetNameForLocalÚremoteForNamer  rS   ÚassertIsr  r�  ÚremoteMethod)	r$   rô   rk  rS   r  r  rÄ   rÃ   rÅ   s	   &        r&   Útest_referenceÚBrokerTests.test_reference§  sÆ   € Ü-°4Ô8‰
ˆˆdô	"”× Ñ ô 	"ô	)”× Ñ ô 	)ð 	
×Ñ˜#™q›sÔ#Ø�O‰O˜CÓ ˆÙ‹CˆÙ‹CˆØ	�‰�W˜aÔ#Ø�	‰	ŒØ�	‰	ŒØ�	‰	ŒØ�‰�a—h‘h Ð#;Ô<ð 	×Ñ˜Ÿ™¨Ó0°!·.±.ÀÓ2IÖJr)   c                óÆ  € \        V R 7      w  rpW3W!33 FÇ  w  rE\        4       pVP                  RV4       VP                  R4      p^V n        VP                  RV P                  ^,
          4      P                  V P                  V P                  4       VP                  4        VP                  4        V P                  V P                  V P                  R4       KÉ  	  R# )rþ  rþ   Úthunkzresult wasn't received.N)r§   r©   r  r  ÚexpectedThunkResultr  r[  ró  rí  rS   r�  rð  )r$   rô   rk  rS   rÃ   rÄ   rþ   Úbars   &       r&   Útest_resultÚBrokerTests.test_result¿  s¼   € Ü-°4Ô8‰
ˆˆdØ�F˜Q˜F“N‰DˆAä“.ˆCØ×Ñ˜e SÔ)Ø—/‘/ %Ó(ˆCØ'(ˆDÔ$Ø�N‰N˜7 D×$<Ñ$<¸qÕ$@ÓA×NÑNØ×$Ñ$ d×&8Ñ&8ôð �I‰IŒKà�I‰IŒKà×ÑØ× Ñ  $×":Ñ":Ð<Uöó #r)   c                ó   € Wn         R # r5   )ÚnestedRemoterñ  s   &&r&   ÚrefcountResultÚBrokerTests.refcountResultÓ  s   € Ø"Ör)   c           
     ó¢  € . p. p\        V R 7      w  r4p\        4       pVP                  RV4       VP                  R4      p\	        \
        P                  ^
,           4       F‚  pVP                  P                  '       g   VP                  P                  '       d    MIVP                  R4      P                  VP                  VP                  4       VP                  4        K„  	  \
        P                  ^,
          p	V P                  VP                  P                  R4       V P                  \        V4      V	RV	 R\        V4       24       R# )rþ  rþ   Ú	getSimpleztransport was not closedz	expected z got N)r§   r¸   r  r  Úranger   ÚMAX_BROKER_REFSr^   Úclosedr  r[  r?  rS   Ú
assertTruer�  Úlen)
r$   ÚlÚerô   rk  rS   rþ   rÃ   ÚignoÚexpecteds
   &         r&   Útest_tooManyRefsÚBrokerTests.test_tooManyRefsÖ  s÷   € ØˆØˆÜ-°4Ô8‰
ˆˆdÜ‹nˆØ	×Ñ˜% Ô%Ø�O‰O˜EÓ"ˆÜœ"×,Ñ,¨rÕ1Ö2ˆDØ�{‰{×!×!Ð! Q§[¡[×%7×%7Ð%7ÙØ�L‰L˜Ó%×2Ñ2°1·8±8¸Q¿X¹XÔFØ�I‰IŽKñ	 3ô
 ×%Ñ%¨Õ)ˆØ�‰˜Ÿ™×*Ñ*Ð,FÔGØ×Ñœ˜Q› ¨Y°x°jÀÄcÈ!ÃfÀXÐ+NÖOr)   c                ó(  € \        V R 7      w  rp\        4       pVP                  RV4       VP                  R4      pVP	                  R4      P                  V P                  V P                  4       VP                  4        VP                  4        V P                  V P                  P                  ^4       V P                  V P                  P                  R,          R4       V P                  V P                  P                  ^ ,          R4       R# )rþ  rþ   ÚgetCopyrÀ   rÁ   r{   N)r§   rã   r  r  r  r[  ró  rí  rS   r�  rð  rÃ   rÄ   rÅ   )r$   rô   rk  rS   rþ   rÃ   s   &     r&   Ú	test_copyÚBrokerTests.test_copyæ  sÊ   € Ü-°4Ô8‰
ˆˆdÜ‹lˆØ	×Ñ˜% Ô%Ø�O‰O˜EÓ"ˆØ	�‰�YÓ×,Ñ,¨T×-AÑ-AÀ4×CUÑCUÔVØ�	‰	ŒØ�	‰	ŒØ×Ñ˜×)Ñ)×+Ñ+¨QÔ/Ø×Ñ˜×)Ñ)×+Ñ+¨GÕ4°gÔ>Ø×Ñ˜×)Ñ)×+Ñ+¨AÕ.°Ö7r)   c                ó  € \        V R 7      w  rp\        4       p\        4       pVP                  RV4       VP	                  R4      pVP                  RV4       VP                  4        VP                  ^4       VP                  4        VP                  4        VP                  ^
4       VP                  4        VP                  4        V P                  VP                  R4       V P                  VP                  ^R4       R# )rþ  r  Úobservezdidn't notifyznotified too muchN)r§   r9  r`  r  r  r  rS   rJ  ÚassertIsNotNonerK  r�  )r$   rô   rk  rS   r  r  Úras   &      r&   Útest_observeÚBrokerTests.test_observeò  sº   € Ü-°4Ô8‰
ˆˆdô ‹LˆÜ‹JˆØ	×Ñ˜#˜qÔ!Ø�_‰_˜SÓ!ˆØ
�‰�i Ô#Ø�	‰	ŒØ	�‰�ŒØ�	‰	ŒØ�	‰	ŒØ	�‰�ŒØ�	‰	ŒØ�	‰	ŒØ×Ñ˜QŸU™U OÔ4Ø×Ñ˜Ÿ™ Ð#6Ö7r)   c                ór  € \        V R 7      w  rp\        4       pVP                  RV4       VP                  R4      pVP	                  4        VP	                  4        . pVP                  R4      P                  VP                  4       VP	                  4        VP	                  4        V P                  VP                  R4       VP                  P                  ^4       V P                  VP                  ^R4       VP	                  4        VP	                  4        V P                  V^ ,          ^R4       R# )rþ  r\  Ú	doItLaterzDeferred method run too early.zDeferred method run too late.zIncorrect result.N)r§   rN  r  r  rS   r  r¥  r?  rž  rR  r\  r�   r�  )r$   rô   rk  rS   r\  r,  Úresultss   &      r&   Ú
test_deferÚBrokerTests.test_defer  sÞ   € Ü-°4Ô8‰
ˆˆdÜÓˆØ	×Ñ˜#˜qÔ!Ø�O‰O˜CÓ ˆØ�	‰	ŒØ�	‰	ŒØˆØ	�‰�[Ó!×-Ñ-¨g¯n©nÔ=Ø�	‰	ŒØ�	‰	ŒØ×Ñ˜Ÿ™Ð @ÔAØ	�‰�‰�QŒØ×Ñ˜Ÿ™ Ð#BÔCØ�	‰	ŒØ�	‰	ŒØ×Ñ˜ � QÐ(;Ö<r)   c                óx  € \        V R 7      w  rp\        4       pVP                  RV4       VP                  R4      pVP	                  R4      P                  V P                  V P                  4       VP                  4        VP                  4        V P                  P                  pV P                  WbP                  4       V =	\        P                  R8¼  d   \        P                   ! 4        VP                  4        VP                  4        VP                  4        V P#                  WbP                  4       R# )rþ  rþ   r%  é   N)r§   r¸   r  r  r  r[  r"  rí  rS   r!  ÚluidÚassertInÚlocalObjectsÚsysÚ
hexversionÚgcÚcollectÚassertNotIn)r$   rô   rk  rS   rþ   r  Úrluids   &      r&   Útest_refcountÚBrokerTests.test_refcount  sÜ   € Ü-°4Ô8‰
ˆˆdÜ‹nˆØ	×Ñ˜% Ô%Ø�o‰o˜eÓ$ˆØ�‰�{Ó#×0Ñ0Ø×Ñ ×!3Ñ!3ô	
ð
 	�	‰	Œà�	‰	Œð ×!Ñ!×&Ñ&ˆØ�‰�eŸ^™^Ô,ØÐä�>‰>˜YÔ&Ü�JŠJŒLà�	‰	ŒØ�	‰	ŒØ�	‰	ŒØ×Ñ˜§¡Ö/r)   c                óf  € \        V R 7      w  rp\        4       p\        4       pVP                  pVP	                  RV4       VP	                  RV4       VP                  R4      pVP                  R4      p. p	VP                  R4      P                  V	P                  4      P                  V	P                  4       VP                  R4      P                  V	P                  4      P                  V	P                  4       . p
VP                  R4      P                  V
P                  4       VP                  R4      P                  V
P                  4       VP                  4        V P                  V
^ ,          P                  ^4       V P                  V
^ ,          P                  ^4       V P                  V
^ ,          P                  ^4       VP                  4        VP                  4        V P                  V
^ ,          P                  ^4       V P                  \!        V	4      ^4       V	^ ,          ^ ,          pV P#                  VP%                  4       P&                  VR4       V P#                  VP)                  4       VR4       . pVP                  RV4      P                  VP                  4       VP                  4        V P+                  V^ ,          4       V P                  VP-                  R4      VP-                  R4      4       VP.                  pV
^ ,          P.                  pV P1                  WÒP2                  R4       ?	?VP                  4        ?
?VP                  4        \4        P6                  R8¼  d   \8        P:                  ! 4        VP                  4        V P=                  WÒP2                  R	4       V P=                  WÑP>                  R
4       V P=                  WâP2                  R4       V P=                  WáP>                  R4       V PA                  VPB                  R4       R# )rþ  rK  ÚxxxÚgetCachezpotential refcounting issuez!other potential refcounting issueÚputCachezremote cache doesn't have itrA  zServer still had it after GCzClient still had it after GCz!Server still had complex after GCz!Client still had complex after GCzobserver was not removedN)"r§   r-  rñ   rô   r  r  r  r¥  r?  Ú
addErrbackrU   r�  rÃ   rÄ   rþ   r  r*  ÚassertIdenticalr$  Ú__self__r(  r)  r  rB  rC  ÚremotelyCachedObjectsrE  rF  rG  rH  rI  ÚlocallyCachedObjectsÚassertIsNoner  )r$   rô   rk  rS   rK  Úobj2ÚvccÚo2Úo3ÚcollÚcomplexÚcpÚcol2rB  ÚbaroqueLuids   &              r&   Ú
test_cacheÚBrokerTests.test_cache4  s  € Ü-°4Ô8‰
ˆˆdÜ‹mˆÜ%Ó'ˆØ�f‰fˆØ	×Ñ˜% Ô%Ø	×Ñ˜% Ô&Ø�_‰_˜UÓ#ˆØ�_‰_˜UÓ#ˆØˆØ
�‰�jÓ!×-Ñ-¨d¯k©kÓ:×EÑEÀdÇkÁkÔRØ
�‰�jÓ!×-Ñ-¨d¯k©kÓ:×EÑEÀdÇkÁkÔRØˆØ
�‰�jÓ!×-Ñ-¨g¯n©nÔ=Ø
�‰�jÓ!×-Ñ-¨g¯n©nÔ=Ø�
‰
Œà×Ñ˜ �Ÿ™ qÔ)Ø×Ñ˜ �Ÿ™ qÔ)Ø×Ñ˜ �Ÿ™¨Ô+à�‰ŒØ�
‰
ŒØ×Ñ˜ �Ÿ™¨Ô+Ø×Ñœ˜T› AÔ&Ø�!�W�Q�ZˆØ×ÑØ�N‰NÓ×%Ñ% rÐ+Hô	
ð 	×Ñ˜RŸ\™\›^¨RÐ1TÔUØˆØ
�‰�j "Ó%×1Ñ1°$·+±+Ô>Ø�
‰
Œà�‰˜˜Q�Ô à×Ñ˜Ÿ™¨Ó4°b·o±oÀjÓ6QÔRð �w‰wˆØ˜a•j—o‘oˆØ�‰�d×3Ñ3Ð5SÔTØØØ�
‰
ŒØØà�
‰
Œô �>‰>˜YÔ&Ü�JŠJŒLà�
‰
Œà×Ñ˜×6Ñ6Ð8VÔWØ×Ñ˜×5Ñ5Ð7UÔVØ×ÑØ×0Ñ0Ð2Uô	
ð 	×ÑØ×/Ñ/Ð1Tô	
ð 	×Ñ˜#Ÿ,™,Ð(BÖCr)   c                ó¤  €  \         P                  ! R 4       \        V R7      w  rp\	        4       pVP                  RV4       VP                  R4      p. pVP                  R4      P                  VP                  V P                  4       VP                  4        VP                  4       pV P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                   ^4       V P                  VP"                  ^ 4       \        V R7      w  rpVP                  RV4       VP                  R4      pVP                  R4      P                  VP                  V P                  4       VP                  4        VP                  4       pV P                  VP"                  ^4       R#   \         d     EL¶i ; i)rä  rþ  rþ   ÚgetPubN)rå  ræ  rç  r§   ÚGetPublisherr  r  r  r[  r?  rí  rU   rŽ   r�  ÚactivateCalledÚisActivatedÚyayIGotPublishedÚ_wasCleanWhenLoaded)r$   rô   rk  rS   rþ   r  ÚaccumrK  s   &       r&   Útest_publishableÚBrokerTests.test_publishablev  sh  € ð	Ü�IŠIÐ-Ô.ô .°4Ô8‰
ˆˆdÜ‹nˆà	×Ñ˜% Ô%Ø�o‰o˜eÓ$ˆØˆØ�‰�xÓ ×-Ñ-¨e¯l©l¸D×<NÑ<NÔOØ�
‰
ŒØ�i‰i‹kˆØ×Ñ˜×+Ñ+¨QÔ/Ø×Ñ˜Ÿ™¨!Ô,Ø×Ñ˜×-Ñ-¨qÔ1à×Ñ˜×0Ñ0°!Ô4Ü-°4Ô8‰
ˆˆdØ	×Ñ˜% Ô%Ø�o‰o˜eÓ$ˆØ�‰�xÓ ×-Ñ-¨e¯l©l¸D×<NÑ<NÔOØ�
‰
ŒØ�i‰i‹kˆà×Ñ˜×0Ñ0°!Ö4øô/ ô 	Úð	ús   ‚G  Ç GÇGc                ó(   € VP                   V n        R # r5   )rÑ   rð  )r$   Úvals   &&r&   ÚgotCopyÚBrokerTests.gotCopy’  s   € ØŸ6™6ˆÖr)   c                ó¢  € \        V R 7      w  rp^cp\        4       pVP                  RV4       VP                  R4      pVP	                  RV4      P                  V P                  V P                  4       VP                  4        VP                  4        VP                  4        V P                  V P                  VRV P                   24       R# )rþ  rþ   Ú
getFactoryz!ID not correct on factory object N)r§   rã   r  r  r  r[  rn  rû  rS   r�  rð  )r$   rô   rk  rS   ÚIDrK  rÃ   s   &      r&   Útest_factoryCopyÚBrokerTests.test_factoryCopy•  s¥   € Ü-°4Ô8‰
ˆˆdØˆÜ‹lˆØ	×Ñ˜% Ô%Ø�O‰O˜EÓ"ˆØ	�‰�\ 2Ó&×3Ñ3°D·L±LÀ$×BUÑBUÔVØ�	‰	ŒØ�	‰	ŒØ�	‰	ŒØ×ÑØ×ÑØØ/°×0@Ñ0@Ð/AÐBö	
r)   )r  r!  rð  )r+   r,   r-   r.   rð  r—  rí  ró  r÷  rû  r  r  r"  r/  r3  r9  r>  rK  r`  rj  rn  rs  r/   r0   r1   s   @r&   râ  râ  ‘  sj   ø‡ € Ø€KòòDò"òò?òKò0ò(#òPò 
8ò8ò(=ò$0ò8@DòD5ò8"÷
ð 
r)   râ  c                  ó   € V s VsR # r5   )ÚcallbackArgsÚcallbackKeyword)Úargsrƒ  s   *,r&   ÚfinishedCallbackry  ¬  s   € à€LØ‚Or)   c                   ó,   a € ] tR tRt o R tR tRtV tR# )Ú	Pagerizeri²  c                ó0   € WVuV n         V n        V n        R # r5   )r�   rx  rƒ  )r$   r�   rx  rƒ  s   &&*,r&   rN   ÚPagerizer.__init__³  s   € Ø,4¸BÐ)ˆŒ�t”y $¦'r)   c                ó    € \         P                  ! V\        ^dV P                  .V P                  O5/ V P
                  B  R;V n        V n        R# )éd   N)r   ÚStringPagerÚ	bigStringr�   rx  rƒ  ©r$   Ú	collectors   &&r&   Úremote_getPagesÚPagerizer.remote_getPages¶  sE   € Ü×ÒØ”y # t§}¡}ð	
Ø7;·y±yò	
ØDHÇGÁGò	
ð #Ð"ˆŒ	�D–Gr)   )rx  r�   rƒ  N)r+   r,   r-   r.   rN   r„  r/   r0   r1   s   @r&   r{  r{  ²  s   ø‡ € ò?÷#ð #r)   r{  c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚFilePagerizeri½  Nc                ó<   € Wn         W#VuV n        V n        V n        R # r5   )Úfilenamer�   rx  rƒ  )r$   r‰  r�   rx  rƒ  s   &&&*,r&   rN   ÚFilePagerizer.__init__À  s   € Ø ŒØ,4¸BÐ)ˆŒ�t”y $¦'r)   c                óÈ   € \         P                  ! V\        V P                  R 4      V P                  .V P
                  O5/ V P                  B V n        R;V n        V n        R# )ÚrbN)r   Ú	FilePagerÚopenr‰  r�   rx  rƒ  Úpagerr‚  s   &&r&   r„  ÚFilePagerizer.remote_getPagesÄ  sP   € Ü—^’^Ø”t˜DŸM™M¨4Ó0°$·-±-ð
ØBFÇ)Á)ò
ØOSÏwÉwñ
ˆŒ
ð #Ð"ˆŒ	�D–Gr)   )rx  r�   r‰  rƒ  r�  )	r+   r,   r-   r.   r�  rN   r„  r/   r0   r1   s   @r&   r‡  r‡  ½  s   ø‡ € Ø€Eò?÷#ð #r)   r‡  c                   óH   a € ] tR tRt o RtR tR tR tR tR t	R t
R	tV tR
# )ÚPagingTestsiË  z(
Test pb objects sending data by pages.
c                óÐ   € V P                  4       V n        \        V P                  R4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)z/
Create a file used to test L{util.FilePager}.
ÚwbN)Úmktempr‰  rŽ  Úwriter�  )r$   Úfs   & r&   r”  ÚPagingTests.setUpÐ  s?   € ð Ÿ™›ˆŒÜ�$—-‘- ×&Ô&¨!Ø�G‰G”IÔ÷ '×&×&Ò&ús   ´AÁA%	c           	     óÜ  € \        V R7      w  rpVP                  R\        \        R^
R7      4       VP	                  R4      p. p\
        P                  ! VR4      P                  VP                  4       V'       g   VP                  4        K  V P                  RP                  V^ ,          4      \        R4       V P                  \        RR4       V P                  \        R	^
/R4       R
# )zO
Test L{util.StringPager}, passing a callback to fire when all pages
are sent.
rþ  rþ   Úhello©rè   ÚgetPagesr)   ú'Pages received not equal to pages sent!úCompleted callback not invokedrè   N)rš  )r§   r  r{  ry  r  r   ÚgetAllPagesr¥  r?  rS   r�  Újoinr�  rv  rw  ©r$   rô   rk  rS   rÃ   r+  s   &     r&   Útest_pagingWithCallbackÚ#PagingTests.test_pagingWithCallbackØ  s»   € ô
 .°4Ô8‰
ˆˆdØ	×Ñ˜%¤Ô+;¸WÈBÔ!OÔPØ�O‰O˜EÓ"ˆØˆÜ×Ò˜˜JÓ'×3Ñ3°A·H±HÔ=ßØ�I‰IŽKØ×ÑØ�H‰H�Q�q•T‹NœIÐ'Pô	
ð 	×Ñœ zÐ3SÔTØ×ÑÜ˜g r˜]Ð,Lö	
r)   c                ón  € \        V R7      w  rpVP                  R\        R4      4       VP                  R4      p. p\        P
                  ! VR4      P                  VP                  4       V'       g   VP                  4        K  V P                  RP                  V^ ,          4      \        R4       R# )z.
Test L{util.StringPager} without a callback.
rþ  rþ   Nrœ  r)   r�  )r§   r  r{  r  r   rŸ  r¥  r?  rS   r�  r   r�  r¡  s   &     r&   Útest_pagingWithoutCallbackÚ&PagingTests.test_pagingWithoutCallbackì  s†   € ô .°4Ô8‰
ˆˆdØ	×Ñ˜%¤¨4£Ô1Ø�O‰O˜EÓ"ˆØˆÜ×Ò˜˜JÓ'×3Ñ3°A·H±HÔ=ßØ�I‰IŽKØ×ÑØ�H‰H�Q�q•T‹NœIÐ'Pö	
r)   c                ó  € V P                  4       p\        VR4      P                  4        \        V R7      w  r#p\	        VR4      pVP                  RV4       VP                  R4      p. p\        P                  ! VR4      P                  VP                  4       ^
pV'       g#   V^ 8”  d   VP                  4        V^,          pK*  V'       g   V P                  R4       V P                  RP                  V^ ,          4      RR4       R# )	z0
Test L{util.FilePager}, sending an empty file.
Úwrþ  Nr  rœ  zgetAllPages timed outr)   r�  )r•  rŽ  Úcloser§   r‡  r  r  r   rŸ  r¥  r?  rS   rë  r�  r   )	r$   ÚfilenameEmptyrô   rk  rS   Ú	pagerizerrÃ   r+  Úttls	   &        r&   Útest_emptyFilePagingÚ PagingTests.test_emptyFilePagingû  sÍ   € ð Ÿ™›ˆÜˆ]˜CÓ ×&Ñ&Ô(Ü-°4Ô8‰
ˆˆdÜ! -°Ó6ˆ	Ø	×Ñ˜% Ô+Ø�O‰O˜EÓ"ˆØˆÜ×Ò˜˜JÓ'×3Ñ3°A·H±HÔ=Øˆß˜˜aœØ�I‰IŒKØ�1�HŠCßØ�I‰IÐ-Ô.Ø×Ñ˜Ÿ™ ! A¥$›¨Ð.WÖXr)   c                óB  € \        V R7      w  rp\        V P                  \        R^	R7      pVP	                  RV4       VP                  R4      p. p\        P                  ! VR4      P                  VP                  4       V'       g   VP                  4        K  V P                  RP                  V^ ,          4      \        R4       V P                  \        RR4       V P                  \        R	^	/R4       V P                  VP                   P"                  . 4       R
# )z†
Test L{util.FilePager}, passing a callback to fire when all pages
are sent, and verify that the pager doesn't keep chunks in memory.
rþ  Úfrodor›  r  rœ  r)   r�  rž  rè   N)r°  )r§   r‡  r‰  ry  r  r  r   rŸ  r¥  r?  rS   r�  r   r�  rv  rw  r�  Úchunks©r$   rô   rk  rS   r«  rÃ   r+  s   &      r&   Útest_filePagingWithCallbackÚ'PagingTests.test_filePagingWithCallback  sã   € ô
 .°4Ô8‰
ˆˆdÜ! $§-¡-Ô1AÀ7ÐRSÔTˆ	Ø	×Ñ˜% Ô+Ø�O‰O˜EÓ"ˆØˆÜ×Ò˜˜JÓ'×3Ñ3°A·H±HÔ=ßØ�I‰IŽKØ×ÑØ�H‰H�Q�q•T‹NœIÐ'Pô	
ð 	×Ñœ zÐ3SÔTØ×ÑÜ˜g q˜\Ð+Kô	
ð 	×Ñ˜Ÿ™×/Ñ/°Ö4r)   c                óÔ  € \        V R7      w  rp\        V P                  R4      pVP                  RV4       VP	                  R4      p. p\
        P                  ! VR4      P                  VP                  4       V'       g   VP                  4        K  V P                  RP                  V^ ,          4      \        R4       V P                  VP                  P                  . 4       R# )z,
Test L{util.FilePager} without a callback.
rþ  Nr  rœ  r)   r�  )r§   r‡  r‰  r  r  r   rŸ  r¥  r?  rS   r�  r   r�  r�  r±  r²  s   &      r&   Útest_filePagingWithoutCallbackÚ*PagingTests.test_filePagingWithoutCallback%  s®   € ô .°4Ô8‰
ˆˆdÜ! $§-¡-°Ó6ˆ	Ø	×Ñ˜% Ô+Ø�O‰O˜EÓ"ˆØˆÜ×Ò˜˜JÓ'×3Ñ3°A·H±HÔ=ßØ�I‰IŽKØ×ÑØ�H‰H�Q�q•T‹NœIÐ'Pô	
ð 	×Ñ˜Ÿ™×/Ñ/°Ö4r)   )r‰  N)r+   r,   r-   r.   r9   r”  r¢  r¥  r­  r³  r¶  r/   r0   r1   s   @r&   r’  r’  Ë  s.   ø‡ € ñòò
ò(
òYò(5÷,5ð 5r)   r’  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚDumbPublishablei7  c                ó
   € R ^/# )rg  r*   r6   s   &r&   ÚgetStateToPublishÚ!DumbPublishable.getStateToPublish8  s   € Ø" AÐ&Ð&r)   r*   N)r+   r,   r-   r.   r»  r/   r0   r1   s   @r&   r¹  r¹  7  s   ø‡ € ÷'ð 'r)   r¹  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚDumbPubi<  c                ó   € ^V n         R# rü   ©re  r6   s   &r&   Ú	activatedÚDumbPub.activated=  s
   € ØˆÖr)   rÀ  N)r+   r,   r-   r.   rÁ  r/   r0   r1   s   @r&   r¾  r¾  <  s   ø‡ € ÷ ð  r)   r¾  c                   ó,   a € ] tR tRt o R tR tRtV tR# )rd  iA  c                ó&   € \        R 4      V n        R# )ÚTESTINGN)r¹  Úpubr6   s   &r&   rN   ÚGetPublisher.__init__B  s   € Ü" 9Ó-ˆŽr)   c                ó   € V P                   # r5   ©rÆ  r6   s   &r&   Úremote_getPubÚGetPublisher.remote_getPubE  s   € Ø�x‰xˆr)   rÉ  N)r+   r,   r-   r.   rN   rÊ  r/   r0   r1   s   @r&   rd  rd  A  s   ø‡ € ò.÷ð r)   rd  c                   óB   a € ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
ÚDisconnectionTestsiL  z
Test disconnection callbacks.
c                ó   € \        R V 24      h)zI shouldn't have been called: ©rÝ   )r$   rx  s   &*r&   rì  ÚDisconnectionTests.errorQ  s   € ÜÐ;¸D¸6ÐBÓCÐCr)   c                ó   € ^V n         R# )z
Called on broker disconnect.
N)ÚgotCallbackr6   s   &r&   ÚgotDisconnectedÚ"DisconnectionTests.gotDisconnectedT  s   € ð ˆÖr)   c                óJ   € V P                  WP                  4       ^V n        R# )z'
Called on RemoteReference disconnect.
N)r�  ÚremoteObjectÚobjectCallback©r$   Úos   &&r&   ÚobjectDisconnectedÚ%DisconnectionTests.objectDisconnectedZ  s    € ð 	×Ñ˜×-Ñ-Ô.ØˆÖr)   c                óZ  € \        V R 7      w  rpVP                  4        VP                  R\        4       4       VP	                  R4      p. pVP                  R\        4       4      P                  VP                  4       VP                  4        V P                  \        V4      ^4       R# )rþ  rÙ  Ú
setBadCopyN)r§   rS   r  Ú
BadCopySetr  r  ÚBadCopyablerQ  r?  rU   r�  r*  )r$   rô   rk  rS   Úgr+  s   &     r&   Útest_badSerializationÚ(DisconnectionTests.test_badSerializationa  sz   € Ü-°4Ô8‰
ˆˆdØ�	‰	ŒØ	×Ñ˜#œz›|Ô,Ø�O‰O˜CÓ ˆØˆØ	�‰�\¤;£=Ó1×<Ñ<¸Q¿X¹XÔFØ�
‰
ŒØ×Ñœ˜Q› Ö#r)   c                óä  € \        V R 7      w  rpVP                  4        VP                  R\        4       4       VP	                  R4      pVP                  4        VP                  4        VP                  4        VP                  V P                  4       V P                  V P                  VP                  4       VP                  V P                  4       V P                  V P                  VP                  4       VP                  V P                  4       V P                  VP                  VP                  4       V P                  V P                  VP                  4       VP                  V P                  4       V P                  VP                  VP                  4       V P                  V P                  VP                  4       VP                  V P                  4       VP                  V P                  4       W@n        VP!                  \"        P$                  ! \&        P(                  4      4       V P+                  V P,                  4       V P+                  V P.                  4       R# )rþ  rÙ  N)r§   rS   r  r©   r  ÚnotifyOnDisconnectrì  rC  ÚdisconnectsÚdontNotifyOnDisconnectrI  Ú_disconnectedÚdisconnectCallbacksrÓ  rÚ  rÖ  rh   r   ri   r   rj   r)  rÒ  r×  )r$   rô   rk  rS   Úrs   &    r&   Útest_disconnectionÚ%DisconnectionTests.test_disconnectionk  s¡  € Ü-°4Ô8‰
ˆˆdØ�	‰	ŒØ	×Ñ˜#œ|›~Ô.ð �O‰O˜CÓ ˆØ�	‰	ŒØ�	‰	ŒØ�	‰	Œð 	
×Ñ˜TŸZ™ZÔ(Ø�‰�d—j‘j !§-¡-Ô0Ø	× Ñ  §¡Ô,Ø×Ñ˜Ÿ™ Q§]¡]Ô3à	×Ñ˜TŸZ™ZÔ(Ø�‰�a—o‘o q§}¡}Ô5Ø�‰�d—j‘j !×"7Ñ"7Ô8Ø	× Ñ  §¡Ô,Ø×Ñ˜Ÿ™¨!¯-©-Ô8Ø×Ñ˜Ÿ™ Q×%:Ñ%:Ô;ð 	
×Ñ˜T×1Ñ1Ô2Ø	×Ñ˜T×4Ñ4Ô5ØÔð 	
×ÑœŸš¬×)=Ñ)=Ó>Ô?Ø�‰˜×(Ñ(Ô)Ø�‰˜×+Ñ+Ö,r)   )rÒ  r×  rÖ  N)r+   r,   r-   r.   r9   rì  rÓ  rÚ  rá  rê  r/   r0   r1   s   @r&   rÍ  rÍ  L  s)   ø‡ € ñòDòò ò$÷!-ð !-r)   rÍ  c                   ó   € ] tR tRtRtR# )ÚFreakOuti�  r*   NrÌ   r*   r)   r&   rí  rí  �  rÍ   r)   rí  c                   ó&   a € ] tR tRt o R tRtV tR# )rß  i“  c                ó   € \        4       hr5   )rí  )r$   Úps   &&r&   ÚgetStateToCopyForÚBadCopyable.getStateToCopyFor”  s
   € Ü‹jÐr)   r*   N)r+   r,   r-   r.   rñ  r/   r0   r1   s   @r&   rß  rß  “  s   ø‡ € ÷ð r)   rß  c                   ó&   a € ] tR tRt o R tRtV tR# )rÞ  i˜  c                ó   € R # r5   r*   )r$   Úbcs   &&r&   Úremote_setBadCopyÚBadCopySet.remote_setBadCopy™  s   € Ùr)   r*   N)r+   r,   r-   r.   rö  r/   r0   r1   s   @r&   rÞ  rÞ  ˜  s   ø‡ € ÷ð r)   rÞ  c                   ó:   a € ] tR tRt o ^ tR tRR ltR tRtV t	R# )ÚLocalRemoteTesti�  c                ó   € V^,           # r«   r*   )r$   rÃ   s   &&r&   Ú	sync_add1ÚLocalRemoteTest.sync_add1   s   € Ø�1�uˆr)   c                ó   € W,           # r5   r*   )r$   rÃ   rÄ   s   &&&r&   Ú	async_addÚLocalRemoteTest.async_add£  s	   € Ø�uˆr)   c                ó   € \        4       hr5   rÏ  r6   s   &r&   Ú
async_failÚLocalRemoteTest.async_fail¦  s
   € Ü‹nÐr)   r*   N)rP  r¬   )
r+   r,   r-   r.   ÚreportAllTracebacksrû  rþ  r  r/   r0   r1   s   @r&   rù  rù  �  s   ø‡ € ØÐòô÷ð r)   rù  c                   óJ   a € ] tR tRt o RtR;ttR tR tR t	R t
R tR	tV tR
# )ÚMyPerspectiveiª  z¯
@ivar loggedIn: set to C{True} when the avatar is logged in.
@type loggedIn: C{bool}

@ivar loggedOut: set to C{True} when the avatar is logged out.
@type loggedOut: C{bool}
Fc                ó   € Wn         R # r5   ©rA   ©r$   rA   s   &&r&   rN   ÚMyPerspective.__init__¶  s   € Ø Žr)   c                ó   € V P                   # )zD
Return the avatar identifier which was used to access this avatar.
r  r6   s   &r&   Úperspective_getAvatarIdÚ%MyPerspective.perspective_getAvatarId¹  s   € ð �}‰}Ðr)   c                ó   € \        4       # r5   )ÚMyViewr6   s   &r&   Úperspective_getViewPointÚ&MyPerspective.perspective_getViewPoint¿  s	   € Ü‹xˆr)   c                ó   € W,           # )z¸
Add the given objects and return the result.  This is a method
unavailable on L{Echoer}, so it can only be invoked by authenticated
users who received their avatar from L{TestRealm}.
r*   r  s   &&&r&   Úperspective_addÚMyPerspective.perspective_addÂ  s   € ð �uˆr)   c                ó   € R V n         R# ©TN©Ú	loggedOutr6   s   &r&   ÚlogoutÚMyPerspective.logoutÊ  ó	   € ØˆŽr)   )rA   r  N)r+   r,   r-   r.   r9   ÚloggedInr  rN   r  r  r  r  r/   r0   r1   s   @r&   r  r  ª  s4   ø‡ € ñð !Ð €Hˆyò!òòò÷ð r)   r  c                   ó2   a € ] tR tRt o Rt]tRtR tRt	V t
R# )Ú	TestRealmiÎ  aš  
A realm which repeatedly gives out a single instance of L{MyPerspective}
for non-anonymous logins and which gives out a new instance of L{Echoer}
for each anonymous login.

@ivar lastPerspective: The L{MyPerspective} most recently created and
    returned from C{requestAvatar}.

@ivar perspectiveFactory: A one-argument callable which will be used to
    create avatars to be returned from C{requestAvatar}.
Nc                óR  € V\         P                  8X  g   Q hVR8X  g   Q hV\        P                  J d   \         P                  \	        4       R 3# V P                  V4      V n        RV P                  n        \         P                  V P                  V P                  P                  3# )zÈ
Verify that the mind and interface supplied have the expected values
(this should really be done somewhere else, like inside a test method)
and return an avatar appropriate for the given identifier.
úBRAINS!c                  ó   € R # r5   r*   r*   r)   r&   r>   Ú)TestRealm.requestAvatar.<locals>.<lambda>è  s   € ±dr)   T)	r   r@   r   Ú	ANONYMOUSr|  ÚperspectiveFactoryÚlastPerspectiver  r  )r$   rA   rB   Ú	interfaces   &&&&r&   rE   ÚTestRealm.requestAvatarß  s‰   € ð œBŸO™OÔ+Ð+Ð+Ø�yÔ Ð Ð Ø”x×)Ñ)Ó)Ü—?‘?¤F£H©lÐ:Ð:à#'×#:Ñ#:¸8Ó#DˆDÔ Ø,0ˆD× Ñ Ô)Ü—O‘O T×%9Ñ%9¸4×;OÑ;O×;VÑ;VÐWÐWr)   )r$  )r+   r,   r-   r.   r9   r  r#  r$  rE   r/   r0   r1   s   @r&   r  r  Î  s#   ø‡ € ñ
ð 'Ðà€O÷Xð Xr)   r  c                   ó&   a € ] tR tRt o R tRtV tR# )r  iï  c                ó"   € \        V\        4      # r5   )r!   r  r#   s   &&r&   Ú
view_checkÚMyView.view_checkð  s   € Ü˜$¤Ó.Ð.r)   r*   N)r+   r,   r-   r.   r)  r/   r0   r1   s   @r&   r  r  ï  s   ø‡ € ÷/ð /r)   r  c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )Ú
LeakyRealmiô  zQ
A realm which hangs onto a reference to the mind object in its logout
function.
c                ó   € Wn         R# )zx
Create a L{LeakyRealm}.

@param mindEater: a callable that will be called with the C{mind}
object when it is available
N©Ú
_mindEater)r$   Ú	mindEaters   &&r&   rN   ÚLeakyRealm.__init__ú  s	   € ð $Žr)   c                óz   aa€ V P                  S4       V P                  V4      o\        P                  SVV3R  l3# )c                  ó(   <€ S SP                  4       3# r5   )r  )rB   Úpersps   €€r&   r>   Ú*LeakyRealm.requestAvatar.<locals>.<lambda>  s   ø€ °°u·|±|³~Ñ0Fr)   )r/  r#  r   r@   )r$   rA   rB   r%  r4  s   &&f&@r&   rE   ÚLeakyRealm.requestAvatar  s1   ù€ Ø�‰˜ÔØ×'Ñ'¨Ó1ˆÜ—‘ Õ(FÐGÐGr)   r.  N)	r+   r,   r-   r.   r9   rN   rE   r/   r0   r1   s   @r&   r,  r,  ô  s   ø‡ € ñò
$÷Hð Hr)   r,  c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚNewCredLeakTestsi	  z'
Tests to try to trigger memory leaks.
c                ó®  a aaa	€ RS n         V 3R lp\        S \        V4      R7      w  po	o. oVP                  R4      pVP	                  RR4      pR pVP                  V4       VVV	3R lpVP                  V4       SP                  4        S P                  S^.4       \        P                  ! 4        S P                  S P                  4       4       R# )	z›
The server does not leak a reference when the client disconnects
suddenly, even if the cred logout function forms a reference cycle with
the perspective.
Nc                 ó>   <€ \         P                  ! V 4      Sn        R # r5   )Úweakrefr“  ÚmindRef)rB   r$   s   &€r&   Ú
setMindRefÚ4NewCredLeakTests.test_logoutLeak.<locals>.setMindRef  s   ø€ Ü"Ÿ;š; tÓ,ˆDŽLr)   )r{   r¥   rÁ  ÚloginrŸ   c                 ón   € V w  r\        4       pVP                  R \        P                  ! VR4      V4      # )ÚrespondrŸ   )r©   r  r   rA  )rÃ   Ú	challengeÚ
challengerrB   s   &   r&   Ú
cbResponseÚ4NewCredLeakTests.test_logoutLeak.<locals>.cbResponse$  s6   € Ø$%Ñ!ˆIÜ“>ˆDØ×(Ñ(Øœ2Ÿ:š: i°Ó:¸Dóð r)   c                 ó¦   <€ SP                  4        SP                  ^4       SP                  \        P                  ! \        R4      4      4       R# )r¬   ÚboomN)rX   r?  rh   r   ri   rÝ   )Ú_ÚconnectionBrokenrS   r   s   &€€€r&   rh   Ú8NewCredLeakTests.test_logoutLeak.<locals>.connectionLost-  s6   ø€ Ø�I‰IŒKØ×#Ñ# AÔ&Ø×'Ñ'¬¯ª¼ÀVÓ8LÓ(MÖNr)   )r<  r§   r,  r  r  r¥  rU   r�  rG  rH  rV  )
r$   r=  r~   rÁ  r\  rD  rh   rI  rS   r   s
   f      @@@r&   Útest_logoutLeakÚ NewCredLeakTests.test_logoutLeak  s»   û€ ð ˆŒõ	-ô ,DØœZ¨
Ó3ô,
Ñ(ˆ�l Dð
 ÐØ×)Ñ)¨&Ó1ˆØ�O‰O˜G XÓ.ˆò	ð 	
�‰�jÔ!÷	Oð
 	
�‰�nÔ%ð 	�
‰
ŒØ×ÑÐ)¨A¨3Ô/ô
 	�
Š
ŒØ×Ñ˜$Ÿ,™,›.Ö)r)   )r<  N)r+   r,   r-   r.   r9   rK  r/   r0   r1   s   @r&   r8  r8  	  s   ø‡ € ñ÷.*ð .*r)   r8  c                   óÈ   a € ] tR tRt o RtR tRR lt]P                  ! ]	P                  4      3R ltR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tRtV tR# )ÚNewCredTestsi?  z5
Tests related to the L{twisted.cred} support in PB.
c                óÖ   € \        4       V n        \        P                  ! V P                  4      V n        \	        V P                  4      V n        \        P                  ! 4       V n        R# )z™
Create a portal with no checkers and wrap it around a simple test
realm.  Set up a PB server on a TCP port which serves perspectives
using that portal.
N)	r  r¥   r	   r£   r¾  r|   r   r¤   rr   r6   s   &r&   r”  ÚNewCredTests.setUpD  sC   € ô “[ˆŒ
Ü—m’m D§J¡JÓ/ˆŒÜ:¸4¿;¹;ÓGˆÔÜ×/Ò/Ó1ˆÖr)   Nc                óR  € \        W P                  V P                  4      w  V n        V n        V n        \        4       V n        \        \        P                  ! RRR4      V P                  4      V n        V P                  P                  4       P                  V P                  4       R# )an  
Connect a client obtained from C{clientFactory} and a server
obtained from the current server factory via an L{IOPump},
then assign them to the appropriate instance variables

@ivar clientFactory: the broker client factory
@ivar clientFactory: L{pb.PBClientFactory} instance

@ivar client: the client broker
@type client: L{pb.Broker}

@ivar server: the server broker
@type server: L{pb.Broker}

@ivar pump: the IOPump connecting the client and server
@type pump: L{IOPump}

@ivar connector: A connector whose connect method recreates
    the above instance variables
@type connector: L{twisted.internet.base.IConnector}
ÚTCPru   iá  N)r‚   rr   r|   rJ   rK   rS   r„   ÚconnectorStater“   r   ÚIPv4Addressro   r‹   r¥  ÚestablishClientAndServer)r$   Ú_ignoreds   &&r&   rU  Ú%NewCredTests.establishClientAndServerO  s…   € ô, /EØ×$Ñ$ d×&8Ñ&8ó/
Ñ+ˆŒ�T”[ $¤)ô >Ó?ˆÔÜ3Ü×Ò  {°DÓ9¸4×;NÑ;Nó
ˆŒð 	×Ñ×+Ñ+Ó-×9Ñ9¸$×:WÑ:WÖXr)   c                óæ   € V P                  V P                  P                  P                  4       V P                  P	                  V4       V P
                  P                  V P                  V4       R# )aL  
Asserts that the client broker's transport was closed and then
mimics the event loop by calling the broker's connectionLost
callback with C{reason}, followed by C{self.clientFactory}'s
C{clientConnectionLost}

@param reason: (optional) the reason to pass to the client
    broker's connectionLost callback
@type reason: L{Failure}
N)r)  rJ   r^   r(  rh   rr   rq   ro   )r$   rp   s   &&r&   ÚcompleteClientLostConnectionÚ)NewCredTests.completeClientLostConnectiono  sN   € ð 	�‰˜Ÿ™×-Ñ-×4Ñ4Ô5ð 	�‰×"Ñ" 6Ô*Ø×Ñ×/Ñ/°·±ÀÖGr)   c                ó¸   a € S P                  4        S P                  P                  4       pV 3R lpV 3R lpVP                  V4       VP                  V4       V# )z–
Assert that L{PBClientFactory.getRootObject}'s Deferred fires with
a L{RemoteReference}, and that disconnecting it runs its
disconnection callbacks.
c                 óH   <€ SP                  V \        P                  4       V # r5   )rœ  r   ÚRemoteReference)ÚrootObjr$   s   &€r&   ÚgotRootObjectÚ6NewCredTests.test_getRootObject.<locals>.gotRootObjectŒ  s   ø€ Ø×!Ñ! '¬2×+=Ñ+=Ô>ØˆNr)   c                 ó¦   <€ \        4       pV P                  VP                  4       SP                  P	                  4        SP                  4        V# r5   )r   rä  r�   rr   Ú
disconnectrY  )r^  ÚdisconnectedDeferredr$   s   & €r&   rb  Ú3NewCredTests.test_getRootObject.<locals>.disconnect�  sD   ø€ Ü#+£:Ð Ø×&Ñ&Ð';×'DÑ'DÔEØ×Ñ×)Ñ)Ô+à×-Ñ-Ô/à'Ð'r)   ©rU  rr   r’  r¥  )r$   ÚrootObjDeferredr_  rb  s   f   r&   Útest_getRootObjectÚNewCredTests.test_getRootObjectƒ  sS   ø€ ð 	×%Ñ%Ô'Ø×,Ñ,×:Ñ:Ó<ˆõ	õ	(ð 	×#Ñ# MÔ2Ø×#Ñ# JÔ/àÐr)   c                ó†   a € S P                  4        S P                  P                  4       pV 3R lpVP                  V4      # )z{
Test that when a connection is lost, calling a method on a
RemoteReference obtained from it raises L{DeadReferenceError}.
c                 óØ   <a € \        4       pS P                  VP                  4       V V3R  lpVP                  V4       SP                  P                  4        SP                  4        V# )c                 ó^   <€ SP                  \        P                  SP                  R 4       R# )ÚmethodN)ÚassertRaisesr   ÚDeadReferenceErrorr  )Úignr^  r$   s   &€€r&   ÚlostConnectionÚSNewCredTests.test_deadReferenceError.<locals>.gotRootObject.<locals>.lostConnectionª  s!   ø€ Ø×!Ñ!¤"×"7Ñ"7¸×9KÑ9KÈXÖVr)   )r   rä  r�   r¥  rr   rb  rY  )r^  rc  rp  r$   s   f  €r&   r_  Ú;NewCredTests.test_deadReferenceError.<locals>.gotRootObject¦  sZ   ù€ Ü#+£:Ð Ø×&Ñ&Ð';×'DÑ'DÔEöWð !×,Ñ,¨^Ô<Ø×Ñ×)Ñ)Ô+à×-Ñ-Ô/à'Ð'r)   re  )r$   rf  r_  s   f  r&   Útest_deadReferenceErrorÚ$NewCredTests.test_deadReferenceErrorž  s=   ø€ ð
 	×%Ñ%Ô'Ø×,Ñ,×:Ñ:Ó<ˆõ	(ð ×*Ñ*¨=Ó9Ð9r)   c                óÐ   a €  ! R R\         P                  4      pV! 4       S n        S P                  4        S P                  P	                  4       pV 3R lpVP                  V4      # )z¢
Test that if the L{reconnecting} flag is passed with a True value then
a remote call made from a disconnection notification callback gets a
result successfully.
c                   ó*   a € ] tR tRt o RtR tRtV tR# )Ú=NewCredTests.test_clientConnectionLost.<locals>.ReconnectOncei½  Fc                ó¦   € V P                   '       * pR V n         \        P                  P                  WW#4      pV'       d   VP	                  4        V# )T)ÚreconnectedAlreadyr   r¤   rq   r›   )r$   ro   rp   Úreconnectingrò  s   &&&  r&   rq   ÚRNewCredTests.test_clientConnectionLost.<locals>.ReconnectOnce.clientConnectionLostÀ  sI   € Ø#'×#:Ñ#:Ô:�Ø*.�Ô'Ü×+Ñ+×@Ñ@Ø Vó�÷  Ø×%Ñ%Ô'Ø�r)   )ry  N)r+   r,   r-   r.   ry  rq   r/   r0   r1   s   @r&   ÚReconnectOncerw  ½  s   ø‡ € Ø!&Ð÷ð r)   r|  c                 ó  <€ SP                  V \        P                  4       \        4       pV P	                  VP
                  4       SP                  P                  4        SP                  4        V3R  lpVP                  V4      # )c                 óf   <€ SP                   P                  4       pV3R  lpVP                  V4      # )c                 óæ   <€ SP                  V \        P                  4       \        4       pV P	                  VP
                  4       SP                  P                  4        SP                  4        V# r5   )	rœ  r   r]  r   rä  r�   rr   rb  rY  )ÚanotherRootObjr\  r$   s   & €r&   ÚgotAnotherRootObjectÚqNewCredTests.test_clientConnectionLost.<locals>.gotRootObject.<locals>.disconnected.<locals>.gotAnotherRootObjectÛ  sU   ø€ Ø×)Ñ)¨.¼"×:LÑ:LÔMÜ ›
�AØ"×5Ñ5°a·j±jÔAØ×&Ñ&×1Ñ1Ô3Ø×5Ñ5Ô7Ø�Hr)   )rr   r’  r¥  )ro  r\  r�  r$   s   &  €r&   rg   ÚSNewCredTests.test_clientConnectionLost.<locals>.gotRootObject.<locals>.disconnectedØ  s.   ø€ Ø×&Ñ&×4Ñ4Ó6�õð —}‘}Ð%9Ó:Ð:r)   )
rœ  r   r]  r   rä  r�   rr   rb  rY  r¥  )r^  r\  rg   r$   s   &  €r&   r_  Ú=NewCredTests.test_clientConnectionLost.<locals>.gotRootObjectÏ  sf   ø€ Ø×!Ñ! '¬2×+=Ñ+=Ô>ä“
ˆAØ×&Ñ& q§z¡zÔ2à×Ñ×)Ñ)Ô+Ø×-Ñ-Ô/õ;ð —=‘= Ó.Ð.r)   )r   r¤   rr   rU  r’  r¥  )r$   r|  rf  r_  s   f   r&   Útest_clientConnectionLostÚ&NewCredTests.test_clientConnectionLost¶  sY   ø€ ô	œB×.Ñ.ô 	ñ +›_ˆÔØ×%Ñ%Ô'à×,Ñ,×:Ñ:Ó<ˆõ	/ð0 ×*Ñ*¨=Ó9Ð9r)   c                ó  € V P                  4        V P                  P                  R4      pVP                  \        P
                  ! \        4       4      4       VP                  \        P                  ! \        P                  4      4       R# )z|
Test that if a Broker loses its connection without receiving any bytes,
it doesn't raise any exceptions or log any errors.
N)ru   i90  )rU  r|   rv   rx   r   ry   rw   rh   r   ri   r   rj   )r$   ÚserverProtos   & r&   Útest_immediateCloseÚ NewCredTests.test_immediateCloseé  s_   € ð
 	×%Ñ%Ô'Ø×(Ñ(×6Ñ6Ð7KÓLˆØ×"Ñ"¤8×#7Ò#7¼»
Ó#CÔDØ×"Ñ"¤7§?¢?´4×3GÑ3GÓ#HÖIr)   c                ó  € \         P                  ! 4       pVP                  \        P                  ! RR4      4      pVP                  R\        P                  ! \        R4      4      4       V P                  V\        4      # )z�
L{PBClientFactory.login} returns a L{Deferred} which is errbacked
with the L{ConnectionRefusedError} if the underlying connection is
refused.
ó   fooó   barNz!Test simulated refused connection)
r   r¤   r?  r   ÚUsernamePasswordÚclientConnectionFailedr   ri   r   ÚassertFailure)r$   rr   ÚloginDeferreds   &  r&   Útest_loginConnectionRefusedÚ(NewCredTests.test_loginConnectionRefusedó  sp   € ô ×*Ò*Ó,ˆØ%×+Ñ+Ü×(Ò(¨°Ó8ó
ˆð 	×,Ñ,ØÜ�OŠOÜ&Ð'JÓKóô	
ð ×!Ñ! -Ô1GÓHÐHr)   c                óF  a a€ S P                   P                  \        P                  ! RR7      4       \        P
                  ! RR4      pRp\        4       oS P                  P                  W4      pVV 3R lpV 3R lpVP                  V4       VP                  V4       V 3R lpVP                  V4       S P                  4        S P                  P                  4        \        P                  ! 4        S P                  P                  4        SP                  R4       V# )	z‡
Test that login can be performed with IUsernamePassword credentials and
that when the connection is dropped the avatar is logged out.
ó   pass©r%   ó   userr  c                 ó¦   <€ SP                  SP                  P                  P                  4       SP	                  V \
        P                  4       S# r5   )r)  r¥   r$  r  rœ  r   r]  )r  ÚloginCompletedr$   s   &€€r&   ÚcbLoginÚ.NewCredTests.test_loginLogout.<locals>.cbLogin  s;   ø€ Ø�O‰O˜DŸJ™J×6Ñ6×?Ñ?Ô@Ø×!Ñ! +¬r×/AÑ/AÔBØ!Ð!r)   c                 ó\   <€ SP                   P                  4        SP                  4        R # r5   )rr   rb  rY  ©Úignoredr$   s   &€r&   ÚcbDisconnectÚ3NewCredTests.test_loginLogout.<locals>.cbDisconnect  s!   ø€ Ø×Ñ×)Ñ)Ô+Ø×-Ñ-Ö/r)   c                 óf   <€ SP                  SP                  P                  P                  4       R # r5   )r)  r¥   r$  r  r�  s   &€r&   ÚcbLogoutÚ/NewCredTests.test_loginLogout.<locals>.cbLogout&  s   ø€ Ø�O‰O˜DŸJ™J×6Ñ6×@Ñ@ÖAr)   N)r	   ÚregisterCheckerr   r¡   r   rŽ  r   rr   r?  r¥  rU  rS   rU   rG  rH  r�   )r$   ÚcredsrB   r\  rš  rŸ  r¢  r™  s   f      @r&   Útest_loginLogoutÚNewCredTests.test_loginLogout  sÛ   ù€ ð
 	�‰×#Ñ#Ü×<Ò<À'ÔJô	
ô ×,Ò,¨W°gÓ>ˆð ˆä!›ˆà×Ñ×$Ñ$ UÓ1ˆö	"õ
	0ð 	
�‰�gÔØ	�‰�lÔ#õ	Bð 	
�‰�hÔà×%Ñ%Ô'Ø�	‰	�‰Ôô 	�
Š
Œà�	‰	�‰Ôà×Ñ Ô%Øˆr)   c                óH  a a€ \        4       o ! V3R lR\        P                  4      pVS P                  n        S P
                  P                  \        P                  ! RR7      4       S P                  P                  \        P                  ! RR4      R4      pV3R lpVP                  V4       V 3R lpVP                  V4       S P                  4        S P                  P!                  4        \"        P$                  ! 4        S P                  P!                  4        V# )	zÂ
If a L{RemoteReference} to an L{IPerspective} avatar is decrefed and
there remain no other references to the avatar on the server, the
avatar is garbage collected and the logout method called.
c                   ó8   <a € ] tR tRt o RtR tV3R ltRtV tR# )Ú=NewCredTests.test_logoutAfterDecref.<locals>.EventPerspectivei>  z9
An avatar which fires a Deferred when it is logged out.
c                ó   € R # r5   r*   r  s   &&r&   rN   ÚFNewCredTests.test_logoutAfterDecref.<locals>.EventPerspective.__init__C  s   € Ùr)   c                ó*   <€ SP                  R 4       R # r5   )r�   )r$   r  s   &€r&   r  ÚDNewCredTests.test_logoutAfterDecref.<locals>.EventPerspective.logoutF  s   ø€ Ø×"Ñ" 4Ö(r)   r*   N)	r+   r,   r-   r.   r9   rN   r  r/   r0   )r2   r  s   @€r&   ÚEventPerspectiverª  >  s   ù‡ € ñò÷)ó )r)   r¯  r�  r  rŒ  r  c                 ó   <€ S# r5   r*   )Úavatarr  s   &€r&   Ú
cbLoggedInÚ7NewCredTests.test_logoutAfterDecref.<locals>.cbLoggedInS  s   ø€ ð Ðr)   c                 óh   <€ SP                  SP                  P                  P                  / 4       R # r5   )r�  r|   rÄ  Ú_localCleanupr�  s   &€r&   ÚcbLoggedOutÚ8NewCredTests.test_logoutAfterDecref.<locals>.cbLoggedOutZ  s(   ø€ ð ×Ñ˜T×/Ñ/×@Ñ@×NÑNÐPRÖSr)   )r   r   ÚAvatarr¥   r#  r	   r¤  r   r¡   rr   r?  r   rŽ  r¥  rU  rS   rU   rG  rH  )r$   r¯  r\  r²  r¶  r  s   f    @r&   Útest_logoutAfterDecrefÚ#NewCredTests.test_logoutAfterDecref6  sÕ   ù€ ô “Jˆ	÷		)œrŸy™yô 		)ð )9ˆ�
‰
Ô%à�‰×#Ñ#Ü×<Ò<ÀÔHô	
ð ×Ñ×$Ñ$Ü×(Ò(¨°Ó8¸)ó
ˆõ	ð
 	
�‰�jÔ!õ	Tð
 	
�‰�kÔ"à×%Ñ%Ô'ð 	�	‰	�‰Ôô 	�
Š
Œà�	‰	�‰ÔØˆr)   c                óð  a € S P                   P                  \        P                  ! RRR7      4       S P                  P                  \        P                  ! RR4      R4      pS P                  P                  \        P                  ! RR4      R4      p\        W.4      pR pVP                  V4       V 3R lpVP                  V4       S P                  4        S P                  P                  4        V# )	zˆ
Two different correct login attempts can be made on the same root
object at the same time and produce two different resulting avatars.
r�  s   quux)rþ   ÚbazrŒ  r  ó   bazc                 ó`   € V w  r\        VP                  R 4      VP                  R 4      .4      # )ÚgetAvatarId)r   r  )rò  ÚfirstÚseconds   &  r&   r²  Ú5NewCredTests.test_concurrentLogin.<locals>.cbLoggedIn}  s4   € Ø$‰OˆUÜ Ø×!Ñ! -Ó0°&×2CÑ2CÀMÓ2RÐSóð r)   c                 óX   <€ V w  rSP                  VR 4       SP                  VR4       R# )rŒ  r½  N)r�  )rÃ   rÀ  rÁ  r$   s   &  €r&   ÚcbAvatarIdsÚ6NewCredTests.test_concurrentLogin.<locals>.cbAvatarIds…  s*   ø€ Ø‰MˆEØ×Ñ˜U FÔ+Ø×Ñ˜V VÖ,r)   )r	   r¤  r   r¡   rr   r?  r   rŽ  r   r¥  rU  rS   rU   )r$   Ú
firstLoginÚsecondLoginr\  r²  rÄ  s   f     r&   Útest_concurrentLoginÚ!NewCredTests.test_concurrentLoginl  sÏ   ø€ ð
 	�‰×#Ñ#Ü×<Ò<ÀÈWÔUô	
ð ×'Ñ'×-Ñ-Ü×(Ò(¨°Ó8¸)ó
ˆ
ð ×(Ñ(×.Ñ.Ü×(Ò(¨°Ó9¸9ó
ˆô ˜:Ð3Ó4ˆò	ð 	
�‰�jÔ!õ	-ð
 	
�‰�kÔ"à×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   c                ó  a € S P                   P                  \        P                  ! RR7      4       S P                  P                  \        P                  ! RR4      4      pS P                  P                  \        P                  ! RR4      4      pS P                  V\        4       S P                  V\        4       \        W.4      pV 3R lpVP                  V4       S P                  4        S P                  P                  4        V# )zb
Test that a login attempt with an invalid user or invalid password
fails in the appropriate way.
r•  r–  s
   nosuchuserr—  s	   wrongpassc                 óh   <€ SP                  \        4      pSP                  \        V4      ^4       R# r«  )ÚflushLoggedErrorsr
   r�  r*  ©ÚignoreÚerrorsr$   s   & €r&   ÚcleanupÚ;NewCredTests.test_badUsernamePasswordLogin.<locals>.cleanup¥  s(   ø€ Ø×+Ñ+Ô,=Ó>ˆFØ×ÑœS ›[¨!Ö,r)   )r	   r¤  r   r¡   rr   r?  r   rŽ  r�  r
   r   r¥  rU  rS   rU   )r$   rÆ  rÇ  r\  rÐ  s   f    r&   Útest_badUsernamePasswordLoginÚ*NewCredTests.test_badUsernamePasswordLogin‘  sØ   ø€ ð
 	�‰×#Ñ#Ü×<Ò<À'ÔJô	
ð ×'Ñ'×-Ñ-Ü×(Ò(¨¸Ó@ó
ˆ
ð ×(Ñ(×.Ñ.Ü×(Ò(¨°,Ó?ó
ˆð 	×Ñ˜:Ô'8Ô9Ø×Ñ˜;Ô(9Ô:Ü˜:Ð3Ó4ˆõ	-ð 	
�‰�gÔà×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   c                ót  € V P                   P                  \        P                  ! 4       4       V P                  P                  \        P                  ! 4       R4      pR pVP                  V4       VP                  V P                  ^{4       V P                  4        V P                  P                  4        V# )z—
Verify that a PB server using a portal configured with a checker which
allows IAnonymous credentials can be logged into using IAnonymous
credentials.
r  c                 ó&   € V P                  R ^{4      # ©rš  r  ©r  s   &r&   r²  Ú4NewCredTests.test_anonymousLogin.<locals>.cbLoggedIn¹  ó   € Ø×)Ñ)¨&°#Ó6Ð6r)   )r	   r¤  r   ÚAllowAnonymousAccessrr   r?  r   Ú	Anonymousr¥  r�  rU  rS   rU   )r$   r\  r²  s   &  r&   Útest_anonymousLoginÚ NewCredTests.test_anonymousLogin°  s†   € ð 	�‰×#Ñ#¤H×$AÒ$AÓ$CÔDØ×Ñ×$Ñ$¤[×%:Ò%:Ó%<¸iÓHˆò	7ð 	
�‰�jÔ!à	�‰�d×&Ñ&¨Ô,à×%Ñ%Ô'Ø�	‰	�‰ÔØˆr)   c                ót  a € S P                   P                  \        P                  ! RR7      4       S P                  P                  \        P                  ! 4       R4      pS P                  V\        4       V 3R lpVP                  V4       S P                  4        S P                  P                  4        V# )zO
Verify that without an anonymous checker set up, anonymous login is
rejected.
Úpassr–  r  c                 óh   <€ SP                  \        4      pSP                  \        V4      ^4       R# rü   )rÌ  r   r�  r*  rÍ  s   & €r&   rÐ  Ú=NewCredTests.test_anonymousLoginNotPermitted.<locals>.cleanupÏ  s(   ø€ Ø×+Ñ+Ô,@ÓAˆFØ×ÑœS ›[¨!Ö,r)   )r	   r¤  r   r¡   rr   r?  r   rÛ  r�  r   r¥  rU  rS   rU   )r$   r\  rÐ  s   f  r&   Útest_anonymousLoginNotPermittedÚ,NewCredTests.test_anonymousLoginNotPermittedÄ  s‹   ø€ ð
 	�‰×#Ñ#Ü×<Ò<À&ÔIô	
ð ×Ñ×$Ñ$¤[×%:Ò%:Ó%<¸iÓHˆØ×Ñ˜1Ô2Ô3õ	-ð 	
�‰�gÔà×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   c                óÔ  € V P                   P                  \        P                  ! 4       4       V P                   P                  \        P                  ! RR7      4       V P
                  P                  \        P                  ! 4       R4      pR pVP                  V4       VP                  V P                  ^{4       V P                  4        V P                  P                  4        V# )zl
Like L{test_anonymousLogin} but against a portal with a checker for
both IAnonymous and IUsernamePassword.
r•  r–  r  c                 ó&   € V P                  R ^{4      # rÖ  r  r×  s   &r&   rš  ÚENewCredTests.test_anonymousLoginWithMultipleCheckers.<locals>.cbLoginå  rÙ  r)   )r	   r¤  r   rÚ  r¡   rr   r?  r   rÛ  r¥  r�  rU  rS   rU   ©r$   r\  rš  s   &  r&   Ú'test_anonymousLoginWithMultipleCheckersÚ4NewCredTests.test_anonymousLoginWithMultipleCheckersÚ  s¨   € ð
 	�‰×#Ñ#¤H×$AÒ$AÓ$CÔDØ�‰×#Ñ#Ü×<Ò<À'ÔJô	
ð ×Ñ×$Ñ$¤[×%:Ò%:Ó%<¸iÓHˆò	7ð 	
�‰�gÔà	�‰�d×&Ñ&¨Ô,à×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   c                óØ  € V P                   P                  \        P                  ! 4       4       V P                   P                  \        P                  ! RR7      4       V P
                  P                  \        P                  ! RR4      R4      pR pVP                  V4       VP                  V P                  ^{4       V P                  4        V P                  P                  4        V# )zh
Like L{test_anonymousLoginWithMultipleCheckers} but check that
username/password authentication works.
r•  r–  r—  r  c                 ó(   € V P                  R ^d^4      # )Úaddr  r×  s   &r&   rš  ÚINewCredTests.test_authenticatedLoginWithMultipleCheckers.<locals>.cbLoginþ  s   € Ø×)Ñ)¨%°°bÓ9Ð9r)   )r	   r¤  r   rÚ  r¡   rr   r?  r   rŽ  r¥  r�  rU  rS   rU   rç  s   &  r&   Ú+test_authenticatedLoginWithMultipleCheckersÚ8NewCredTests.test_authenticatedLoginWithMultipleCheckersñ  s¯   € ð
 	�‰×#Ñ#¤H×$AÒ$AÓ$CÔDØ�‰×#Ñ#Ü×<Ò<À'ÔJô	
ð ×Ñ×$Ñ$Ü×(Ò(¨°'Ó:¸Ió
ˆò	:ð 	
�‰�gÔà	�‰�d×&Ñ&¨Ô,à×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   c                ó¢  € V P                   P                  \        P                  ! RR7      4       V P                  P                  \        P                  ! RR4      R4      pR pVP                  V4       R pVP                  V4       VP                  V P                  4       V P                  4        V P                  P                  4        V# )zJ
Verify that a viewpoint can be retrieved after authenticating with
cred.
r•  r–  r—  r  c                 ó$   € V P                  R 4      # )ÚgetViewPointr  r×  s   &r&   rš  Ú'NewCredTests.test_view.<locals>.cbLogin  s   € Ø×)Ñ)¨.Ó9Ð9r)   c                 ó$   € V P                  R 4      # r"  r  )Ú	viewpoints   &r&   ÚcbViewÚ&NewCredTests.test_view.<locals>.cbView  s   € Ø×'Ñ'¨Ó0Ð0r)   )r	   r¤  r   r¡   rr   r?  r   rŽ  r¥  r)  rU  rS   rU   )r$   r\  rš  rö  s   &   r&   Ú	test_viewÚNewCredTests.test_view
  s£   € ð
 	�‰×#Ñ#Ü×<Ò<À'ÔJô	
ð ×Ñ×$Ñ$Ü×(Ò(¨°'Ó:¸Ió
ˆò	:ð 	
�‰�gÔò	1ð 	
�‰�fÔà	�‰�d—o‘oÔ&à×%Ñ%Ô'Ø�	‰	�‰Ôàˆr)   )	rJ   rr   ro   rS  r	   rS   r¥   rK   r|   r5   )r+   r,   r-   r.   r9   r”  rU  r   ri   r   rj   rY  rg  rs  r…  r‰  r’  r¦  r¹  rÈ  rÒ  rÜ  râ  rè  rî  rø  r/   r0   r1   s   @r&   rN  rN  ?  s�   ø‡ € ñò	2ôYðB —_’_ T×%9Ñ%9Ó:ôHò(ò6:ò01:òfJòIò$/òb4òl#òJò>ò(ò,ò.÷2ð r)   rN  c                   ó2   a € ] tR tRt o R tR tR tRtV tR# )ÚNonSubclassingPerspectivei(  c                ó   € R # r5   r*   r  s   &&r&   rN   Ú"NonSubclassingPerspective.__init__*  rù  r)   c                ól   € VP                  W04      pVP                  W@4      pVP                  W#V34      # r5   )ÚunserializeÚ	serialize)r$   rk   Úmessagerx  Úkwargss   &&&&&r&   ÚperspectiveMessageReceivedÚ4NonSubclassingPerspective.perspectiveMessageReceived.  s8   € Ø×!Ñ! $Ó-ˆØ×#Ñ# FÓ1ˆØ×Ñ °Ð 7Ó8Ð8r)   c                ó   € R V n         R# r  r  r6   s   &r&   r  Ú NonSubclassingPerspective.logout4  r  r)   r  N)	r+   r,   r-   r.   rN   r  r  r/   r0   r1   s   @r&   rû  rû  (  s   ø‡ € òò9÷ð r)   rû  c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚNSPTestsi8  zs
Tests for authentication against a realm where the L{IPerspective}
implementation is not a subclass of L{Avatar}.
c                ó–  € \        4       V n        \        V P                  n        \        P
                  ! V P                  4      V n        \        P                  ! 4       V n        V P                  P                  R R4       V P                  P                  V P                  4       \        \        P                  ! V P                  4      4      V n        \        P                   ! ^ V P                  RR7      V n        V P%                  V P"                  P&                  4       V P"                  P)                  4       P"                  V n        R# )r—  r•  ru   )r%  N)r  r¥   rû  r#  r	   r£   r   r¡   r¦   ÚaddUserr¤  r   r   r¢   rÒ  r   rÎ  rÑ  rz   rØ  rÐ  Úportnor6   s   &r&   r”  ÚNSPTests.setUp>  sÊ   € Ü“[ˆŒ
Ü(Aˆ�
‰
Ô%Ü—m’m D§J¡JÓ/ˆŒÜ×GÒGÓIˆŒØ�‰×Ñ˜W gÔ.Ø�‰×#Ñ# D§L¡LÔ1Ü&¤r×'9Ò'9¸$¿+¹+Ó'FÓGˆŒÜ×%Ò% a¨¯©ÀÔMˆŒ	Ø�‰˜Ÿ	™	×/Ñ/Ô0Ø—i‘i×'Ñ'Ó)×.Ñ.ˆŽr)   c                ó\  a a€ \         P                  ! 4       oSP                  \        P                  ! RR4      R4      p\
        P                  ! RS P                  S4       VP                  R 4       VP                  S P                  RR
RR/34       VV 3R	 lpVP                  V4       V# )zw
An L{IPerspective} implementation which does not subclass
L{Avatar} can expose remote methods for the client to call.
r—  r•  r  ru   c                 ó*   € V P                  R RRR7      # )ÚANYTHINGÚherer¼  )r  r  )rð  s   &r&   r>   Ú#NSPTests.test_NSP.<locals>.<lambda>R  s   €  §¡¨Z¸ÀU Ô Kr)   r  r  r¼  c                 ó–   <€ SP                  4        SP                  P                   F  pVP                  P	                  4        K  	  R # r5   )rb  rÒ  Ú	protocolsr^   r×  )rž  rð  rÒ  r$   s   & €€r&   rÐ  Ú"NSPTests.test_NSP.<locals>.cleanupU  s3   ø€ Ø×ÑÔ Ø—\‘\×+Ô+�Ø—‘×*Ñ*Ö,ó ,r)   )r  )
r   r¤   r?  r   rŽ  r   rÏ  r  r¥  r�  )r$   r\  rÐ  rÒ  s   f  @r&   Útest_NSPÚNSPTests.test_NSPJ  sŠ   ù€ ô
 ×$Ò$Ó&ˆØ�M‰Mœ+×6Ò6°wÀÓHÈ)ÓTˆÜ×Ò˜;¨¯©°WÔ=Ø	�‰ÑKÔLØ	�‰�d×&Ñ&¨°YÀÈÀÐ(OÔPö	-ð
 	
�‰�gÔØˆr)   )r¦   rÒ  rÑ  r	   r  r¥   N)	r+   r,   r-   r.   r9   r”  r  r/   r0   r1   s   @r&   r  r  8  s   ø‡ € ñò

/÷ð r)   r  c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )Ú
IForwardedi^  z9
Interface used for testing L{util.LocalAsyncForwarder}.
c                 ó   € R# )z
Simple synchronous method.
Nr*   r*   r)   r&   Ú	forwardMeÚIForwarded.forwardMec  ó   ‚ r)   c                 ó   € R# )z
Simple asynchronous method.
Nr*   r*   r)   r&   ÚforwardDeferredÚIForwarded.forwardDeferredh  r  r)   r*   N)	r+   r,   r-   r.   r9   r  r  r/   r0   r1   s   @r&   r  r  ^  s   ø‡ € ñò÷
ð r)   r  c                   ó>   a € ] tR tRt o RtRtRtR tR tR t	Rt
V tR# )	Ú	Forwardedin  zÂ
Test implementation of L{IForwarded}.

@ivar forwarded: set if C{forwardMe} is called.
@type forwarded: C{bool}
@ivar unforwarded: set if C{dontForwardMe} is called.
@type unforwarded: C{bool}
Fc                ó   € RV n         R# )z&
Set a local flag to test afterwards.
TN)Ú	forwardedr6   s   &r&   r  ÚForwarded.forwardMe|  s   € ð ˆŽr)   c                ó   € RV n         R# )z^
Set a local flag to test afterwards. This should not be called as it's
not in the interface.
TN)Úunforwardedr6   s   &r&   ÚdontForwardMeÚForwarded.dontForwardMe‚  s   € ð
  ˆÖr)   c                ó   € \        R4      # )z 
Asynchronously return C{True}.
T)r   r6   s   &r&   r  ÚForwarded.forwardDeferred‰  s   € ô �t‹}Ðr)   )r#  r&  N)r+   r,   r-   r.   r9   r#  r&  r  r'  r  r/   r0   r1   s   @r&   r!  r!  n  s*   ø‡ € ñð €IØ€Kòò ÷ð r)   r!  c                   óB   a € ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
ÚSpreadUtilTestsi�  z#
Tests for L{twisted.spread.util}.
c                ó^   € \        4       pV P                  VP                  R^4      ^4       R# )zS
Call a synchronous method of a L{util.LocalAsRemote} object and check
the result.
Úadd1N)rù  r�  r  rØ  s   & r&   Ú	test_syncÚSpreadUtilTests.test_sync•  s'   € ô
 ÓˆØ×Ñ˜Ÿ™ f¨aÓ0°!Ö4r)   c                óº   € \        4       p\        4       pVP                  R^^R7      pV P                  V\        4       VP	                  V P
                  ^4       V# )zU
Call an asynchronous method of a L{util.LocalAsRemote} object and check
the result.
rì  )rÄ   )rù  r  rœ  r   r¥  r�  )r$   rÙ  r\  s   &  r&   Ú
test_asyncÚSpreadUtilTests.test_async�  sQ   € ô
 ÓˆÜÓˆØ�L‰L˜  QˆLÓ'ˆØ×Ñ˜a¤Ô*Ø	�‰�d×&Ñ&¨Ô*Øˆr)   c                óv   a € \        4       pVP                  R4      pV 3R lpVP                  V 3R lV4       V# )z7
Test an asynchronous failure on a remote method call.
rë  c                 ór   <€ SP                  V \        P                  4       V P                  \        4       R # r5   )rœ  r   ri   ÚtraprÝ   )r—  r$   s   &€r&   ÚebÚ*SpreadUtilTests.test_asyncFail.<locals>.eb°  s#   ø€ Ø×!Ñ! !¤W§_¡_Ô5Ø�F‰F”<Ö r)   c                 ó&   <€ SP                  R 4      # )zsupposed to failrê  )r   r$   s   &€r&   r>   Ú0SpreadUtilTests.test_asyncFail.<locals>.<lambda>´  s   ø€  4§9¡9Ð-?Ô#@r)   )rù  r  r[  )r$   rÙ  r\  r7  s   f   r&   Útest_asyncFailÚSpreadUtilTests.test_asyncFail©  s6   ø€ ô ÓˆØ�L‰L˜Ó ˆõ	!ð 	
�‰Ô@À"ÔEØˆr)   c                ól   € \        4       pVP                  R4      pV P                  V! ^4      ^4       R# )z=
Test the C{remoteMethod} facility of L{util.LocalAsRemote}.
r.  N)rù  r  r�  )r$   rÙ  Úms   &  r&   Útest_remoteMethodÚ!SpreadUtilTests.test_remoteMethod·  s.   € ô ÓˆØ�N‰N˜6Ó"ˆØ×Ñ™˜1›˜qÖ!r)   c                óŽ  € \        4       p\        P                  ! V\        4      pVP	                  R4       V P                  VP                  4       VP	                  R4       V P                  VP                  4       VP	                  R4      p. pVP                  VP                  4       V P                  V^ ,          ^4       R# )zM
Test a call to L{util.LocalAsyncForwarder} using L{Forwarded} local
object.
r  r'  r  N)r!  r   ÚLocalAsyncForwarderr  r  r)  r#  rž  r&  r¥  r?  r�  )r$   r—  ÚlfÚrrr+  s   &    r&   Útest_localAsyncForwarderÚ(SpreadUtilTests.test_localAsyncForwarder¿  s�   € ô
 ‹KˆÜ×%Ò% a¬Ó4ˆØ
�‰�kÔ"Ø�‰˜Ÿ™Ô$Ø
�‰�oÔ&Ø×Ñ˜Ÿ™Ô'Ø�]‰]Ð,Ó-ˆØˆØ
�‰�q—x‘xÔ Ø×Ñ˜˜1�˜qÖ!r)   r*   N)r+   r,   r-   r.   r9   r/  r2  r;  r?  rE  r/   r0   r1   s   @r&   r,  r,  �  s(   ø‡ € ñò5ò
òò"÷"ð "r)   r,  c                   ó<   a € ] tR tRt o RtR tR tR tR tRt	V t
R# )	ÚPBWithSecurityOptionsTestsiÐ  z
Test security customization.
c                ó¦   € \         P                  ! 4       pVP                  R4      pV P                  VP                  \
        P                  4       R# )zT
By default, client broker should use C{jelly.globalSecurity} as
security settings.
N)r   r¤   rv   r  Úsecurityr   ÚglobalSecurity©r$   rÒ  rk   s   &  r&   Ú!test_clientDefaultSecurityOptionsÚ<PBWithSecurityOptionsTests.test_clientDefaultSecurityOptionsÕ  s:   € ô
 ×$Ò$Ó&ˆØ×&Ñ& tÓ,ˆØ�‰�f—o‘o¤u×';Ñ';Ö<r)   c                ó¸   € \         P                  ! \        4       4      pVP                  R4      pV P	                  VP
                  \        P                  4       R# )zT
By default, server broker should use C{jelly.globalSecurity} as
security settings.
N)r   r¢   r|  rv   r  rJ  r   rK  rL  s   &  r&   Ú!test_serverDefaultSecurityOptionsÚ<PBWithSecurityOptionsTests.test_serverDefaultSecurityOptionsÞ  s>   € ô
 ×$Ò$¤V£XÓ.ˆØ×&Ñ& tÓ,ˆØ�‰�f—o‘o¤u×';Ñ';Ö<r)   c                ó¸   € \         P                  ! 4       p\        P                  ! VR7      pVP	                  R4      pV P                  VP                  V4       R# )z[
Check that the security settings are passed from the client factory to
the broker object.
©rJ  N)r   ÚSecurityOptionsr   r¤   rv   r  rJ  ©r$   rJ  rÒ  rk   s   &   r&   Ú test_clientSecurityCustomizationÚ;PBWithSecurityOptionsTests.test_clientSecurityCustomizationç  sD   € ô
 ×(Ò(Ó*ˆÜ×$Ò$¨hÔ7ˆØ×&Ñ& tÓ,ˆØ�‰�f—o‘o xÖ0r)   c                óÊ   € \         P                  ! 4       p\        P                  ! \	        4       VR7      pVP                  R4      pV P                  VP                  V4       R# )z[
Check that the security settings are passed from the server factory to
the broker object.
rS  N)r   rT  r   r¢   r|  rv   r  rJ  rU  s   &   r&   Ú test_serverSecurityCustomizationÚ;PBWithSecurityOptionsTests.test_serverSecurityCustomizationñ  sH   € ô
 ×(Ò(Ó*ˆÜ×$Ò$¤V£X¸ÔAˆØ×&Ñ& tÓ,ˆØ�‰�f—o‘o xÖ0r)   r*   N)r+   r,   r-   r.   r9   rM  rP  rV  rY  r/   r0   r1   s   @r&   rH  rH  Ð  s#   ø‡ € ñò=ò=ò1÷1ð 1r)   rH  r5   sô  helloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworld)�r9   rG  rå  rE  rR   r;  Úcollectionsr   Úior   rw   Útypingr   Úzope.interfacer   r   Útwisted.credr   r   r	   Útwisted.cred.errorr
   r   Útwisted.internetr   r   r   r   Útwisted.internet.deferr   r   r   Útwisted.internet.errorr   Útwisted.internet.testingr   Útwisted.protocols.policiesr   Útwisted.pythonr   r   Útwisted.python.compatr   Útwisted.spreadr   r   r   r   Útwisted.trialr   ÚViewabler   r¸  r"   ÚIRealmr;   rH   r‚   r„   r“   r§   r  r©   r¸   ÚCopyabler½   Ú
RemoteCopyrË   ÚsetUnjellyableForClassrÏ   rá   ÚsetUnjellyableFactoryForClassrã   Ú	Cacheablerì   rñ   ró   ÚRemoteCacher  r  r-  r9  rN  r`  rh  rn  rx  ÚRootr|  r‡  ÚSynchronousTestCaser�  r¢   r¾  ÚTestCaserÈ  râ  r�  rv  rw  ry  r{  r‡  r’  ÚPublishabler¹  ÚRemotePublishedr¾  rd  rÍ  r´   rí  rß  rÞ  ÚLocalAsRemoterù  r@   r  r  r  r,  r8  rN  rû  r  r  r!  r,  rH  r*   r)   r&   Ú<module>rx     sð  ðñó 
Û 	Û 
Û Û Ý Ý "Ý ç 1ç 6Ñ 6ß Fß =Ó =ß CÑ CÝ 9Ý 3Ý 6ß 'Ý +ß 3Ó 3Ý "ô+ˆB�K‰Kô +ô�r—y‘yô ñ ˆV�]‰]Ó÷Gð Gó ðG÷8ñ 8òv0,÷f4ñ 4ôB  ô  ô4Fô�2×#Ñ#ô ô�2×#Ñ#ô ô
�—‘ô ô	�b—m‘mô 	ð × Ò ˜* oÔ 6ô
,˜Ÿ™ô 
,òð  ×  Ò  Ð!2Ð4EÔ Fô(�×!Ñ!ô (ô�"—,‘,ô ô˜R×-Ñ-ô ô! 2§<¡<ô !ô*%˜Ÿ™ô %ð × Ò Ð6Ð8JÔ Kô�r—~‘~ô ð × Ò ˜+Ð'7Ô 8ô�"×"Ñ"ô ô5�×!Ñ!ô 5ô�R×%Ñ%ô ô,,ˆr×Ñô ,ô�2—;‘; §¡ô ð
 × Ò ˜,¨Ô 5ô'�B—K‘K §¡ô 'ð × Ò ˜-¨Ô 7ô˜Ÿ™ b§n¡nô ð
 × Ò Ð+Ð->Ô ?ôˆR�W‰Wô ô�R—W‘Wô ôO�H×0Ñ0ô Oôd B×$6Ñ$6ô ô@4˜(×+Ñ+ô 4ônR
�(×#Ñ#ô R
ðj €	à€Ø€òô#�× Ñ ô #ô#�B×$Ñ$ô #ôi5�(×#Ñ#ô i5ôX'�g×)Ñ)ô 'ô
 ˆg×%Ñ%ô  ô
�2×#Ñ#ô ð × Ò ˜/¨7Ô 3ô@-˜×*Ñ*ô @-ôF	ˆyô 	ô�"—+‘+ô ô
�×!Ñ!ô ô

�d×(Ñ(ô 
ñ ˆR�_‰_Óô �B—I‘Ió  ó ð ÷FXñ XôB/ˆR�[‰[ô /ô
H�ô Hô*3*�x×(Ñ(ô 3*ôlf�8×$Ñ$ô fñR ˆR�_‰_Ó÷ð ó ðô#ˆx× Ñ ô #ôL�ô ñ  ˆZÓ÷ð ó ðôB="�h×'Ñ'ô ="ô@)1 ×!2Ñ!2ö )1r)   