Ë
    ojC<  ã                  óü  — d Z ddlmZ ddgZddlmZ ddlmZmZm	Z	 ddl
mZmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddl!m"Z" ddl#m$Z$m%Z%m&Z& dD � cg c]  } d| › d�‘Œ
 c} Z'dZ(e'D �cg c]  }|jS                  d«      ‘Œ c}Z*e(jS                  d«      Z+ ee«       G d„ d«      «       Z, G d„ d«      Z- G d„ d«      Z. G d„ dej^                  «      Z0yc c} w c c}w )z2
Helpers related to HTTP requests, used by tests.
é    )ÚannotationsÚDummyChannelÚDummyRequest)ÚBytesIO)ÚDictÚListÚOptional)ÚimplementerÚverify)ÚVersion)ÚIPv4AddressÚIPv6Address)ÚDeferred)ÚIAddressÚISSLTransport)ÚClock)Ú
deprecated)Úunittest)ÚFOUND)ÚHeaders)ÚResource)ÚNOT_DONE_YETÚSessionÚSite)úú
z
ÚFooÚbarzFoo barÚasciic                  ó   — e Zd ZdZy)ÚNullAddressz/
    A null implementation of L{IAddress}.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú@/usr/lib/python3/dist-packages/twisted/web/test/requesthelper.pyr!   r!   '   s   „ òr'   r!   c                  óÚ   — e Zd Z G d„ d«      Z ee«       G d„ de«      «       Z e e«       «      Z	dd„Z
d„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)r   c                  óF   — e Zd ZdZdZdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zy)úDummyChannel.TCPéP   FNc                ó\   — |€t        ddd«      }|| _        t        «       | _        g | _        y )NÚTCPz192.168.1.1i80  )r   Ú_peerr   ÚwrittenÚ	producers©ÚselfÚpeers     r(   Ú__init__zDummyChannel.TCP.__init__3   s,   € Øˆ|Ü" 5¨-¸Ó?�ØˆDŒJÜ"›9ˆDŒLØˆD�Nr'   c                ó   — | j                   S ©N)r/   ©r3   s    r(   ÚgetPeerzDummyChannel.TCP.getPeer:   s   € Ø—:‘:Ðr'   c                óv   — t        |t        «      st        d|›�«      ‚| j                  j	                  |«       y )Nz)Can only write bytes to a transport, not )Ú
isinstanceÚbytesÚ	TypeErrorr0   Úwrite©r3   Údatas     r(   r>   zDummyChannel.TCP.write=   s1   € Ü˜d¤EÔ*ÜÐ"KÈDÈ8Ð TÓUÐUØ�L‰L×Ñ˜tÕ$r'   c                ó4   — |D ]  }| j                  |«       Œ y r7   )r>   )r3   Úiovecr@   s      r(   ÚwriteSequencezDummyChannel.TCP.writeSequenceB   s   € Øò !�Ø—
‘
˜4Õ ñ!r'   c                ó0   — t        dd| j                  «      S )Nr.   z10.0.0.1)r   Úportr8   s    r(   ÚgetHostzDummyChannel.TCP.getHostF   s   € Ü˜u j°$·)±)Ó<Ð<r'   c                ó>   — | j                   j                  ||f«       y r7   )r1   Úappend©r3   ÚproducerÚ	streamings      r(   ÚregisterProducerz!DummyChannel.TCP.registerProducerI   s   € Ø�N‰N×!Ñ! 8¨YÐ"7Õ8r'   c                 ó   — y r7   r&   r8   s    r(   ÚunregisterProducerz#DummyChannel.TCP.unregisterProducerL   s   € Ør'   c                ó   — d| _         y )NT)Údisconnectedr8   s    r(   ÚloseConnectionzDummyChannel.TCP.loseConnectionO   s
   € Ø $ˆDÕr'   r7   )r"   r#   r$   rE   rP   r5   r9   r>   rC   rF   rL   rN   rQ   r&   r'   r(   r.   r+   /   s4   „ ØˆØˆó	 ò	ò	%ò
	!ò	=ò	9ò	ó	%r'   r.   c                  ó6   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	y)	úDummyChannel.SSLc                 ó   — y r7   r&   r8   s    r(   ÚabortConnectionz DummyChannel.SSL.abortConnectionT   ó   € àr'   c                 ó   — y r7   r&   r8   s    r(   ÚgetTcpKeepAlivez DummyChannel.SSL.getTcpKeepAliveX   rV   r'   c                 ó   — y r7   r&   r8   s    r(   ÚgetTcpNoDelayzDummyChannel.SSL.getTcpNoDelay\   rV   r'   c                 ó   — y r7   r&   r8   s    r(   ÚloseWriteConnectionz$DummyChannel.SSL.loseWriteConnection`   rV   r'   c                 ó   — y r7   r&   ©r3   Úenableds     r(   ÚsetTcpKeepAlivez DummyChannel.SSL.setTcpKeepAlived   rV   r'   c                 ó   — y r7   r&   r^   s     r(   ÚsetTcpNoDelayzDummyChannel.SSL.setTcpNoDelayh   rV   r'   c                 ó   — y r7   r&   r8   s    r(   ÚgetPeerCertificatez#DummyChannel.SSL.getPeerCertificatel   rV   r'   N)
r"   r#   r$   rU   rX   rZ   r\   r`   rb   rd   r&   r'   r(   ÚSSLrS   R   s%   „ ò	ò	ò	ò	ò	ò	ó	r'   re   Nc                ó0   — | j                  |«      | _        y r7   )r.   Ú	transportr2   s     r(   r5   zDummyChannel.__init__r   s   € ØŸ™ $›ˆ�r'   c                 ó   — y r7   r&   )r3   Úrequests     r(   ÚrequestDonezDummyChannel.requestDoneu   ó   € Ør'   c                ó´   — |dz   |z   dz   |z   dz   }|g}|j                  d„ |D «       «       |j                  d«       | j                  j                  |«       y )Nó    ó   
c              3  ó8   K  — | ]  \  }}|d z   |z   dz   –— Œ y­w)s   : rn   Nr&   )Ú.0ÚnameÚvalues      r(   ú	<genexpr>z,DummyChannel.writeHeaders.<locals>.<genexpr>{   s"   è ø€ ÒXÁÀÀu˜d U™l¨UÑ2°WÕ<ÑXùs   ‚)ÚextendrH   rg   rC   )r3   ÚversionÚcodeÚreasonÚheadersÚresponse_lineÚheaderSequences          r(   ÚwriteHeaderszDummyChannel.writeHeadersx   s[   € Ø $™¨Ñ-°Ñ4°vÑ=ÀÑGˆØ'˜ˆØ×ÑÑXÐPWÔXÔXØ×Ñ˜gÔ&Ø�‰×$Ñ$ ^Õ4r'   c                ó6   — | j                   j                  «       S r7   )rg   r9   r8   s    r(   r9   zDummyChannel.getPeer   ó   € Ø�~‰~×%Ñ%Ó'Ð'r'   c                ó6   — | j                   j                  «       S r7   )rg   rF   r8   s    r(   rF   zDummyChannel.getHost‚   r}   r'   c                ó<   — | j                   j                  ||«       y r7   )rg   rL   rI   s      r(   rL   zDummyChannel.registerProducer…   s   € Ø�‰×'Ñ'¨°)Õ<r'   c                ó8   — | j                   j                  «        y r7   )rg   rN   r8   s    r(   rN   zDummyChannel.unregisterProducerˆ   s   € Ø�‰×)Ñ)Õ+r'   c                ó:   — | j                   j                  |«       y r7   )rg   r>   r?   s     r(   r>   zDummyChannel.write‹   s   € Ø�‰×Ñ˜TÕ"r'   c                ó:   — | j                   j                  |«       y r7   )rg   rC   )r3   rB   s     r(   rC   zDummyChannel.writeSequenceŽ   s   € Ø�‰×$Ñ$ UÕ+r'   c                ó8   — | j                   j                  «        y r7   )rg   rQ   r8   s    r(   rQ   zDummyChannel.loseConnection‘   s   € Ø�‰×%Ñ%Õ'r'   c                 ó   — y r7   r&   r8   s    r(   Ú
endRequestzDummyChannel.endRequest”   rk   r'   c                óB   — t        | j                  | j                  «      S r7   )r;   rg   re   r8   s    r(   ÚisSecurezDummyChannel.isSecure—   s   € Ü˜$Ÿ.™.¨$¯(©(Ó3Ð3r'   c                 ó   — y r7   r&   r8   s    r(   rU   zDummyChannel.abortConnectionš   ó   € àr'   c                 ó   — y r7   r&   r8   s    r(   rX   zDummyChannel.getTcpKeepAlivež   r‰   r'   c                 ó   — y r7   r&   r8   s    r(   rZ   zDummyChannel.getTcpNoDelay¢   r‰   r'   c                 ó   — y r7   r&   r8   s    r(   r\   z DummyChannel.loseWriteConnection¦   r‰   r'   c                 ó   — y r7   r&   r8   s    r(   r`   zDummyChannel.setTcpKeepAliveª   r‰   r'   c                 ó   — y r7   r&   r8   s    r(   rb   zDummyChannel.setTcpNoDelay®   r‰   r'   c                 ó   — y r7   r&   r8   s    r(   rd   zDummyChannel.getPeerCertificate²   r‰   r'   r7   )r"   r#   r$   r.   r
   r   re   r   r   Úsiter5   rj   r{   r9   rF   rL   rN   r>   rC   rQ   r…   r‡   rU   rX   rZ   r\   r`   rb   rd   r&   r'   r(   r   r   .   sš   „ ÷!%ñ !%ñF �Óôˆcó ó  ðñ: ‘“
Ó€Dó(òò5ò(ò(ò=ò,ò#ò,ò(òò4òòòòòòór'   c                  ó(  — e Zd ZU dZdZdZdZded<   ded<   ded	<   ded
<   ded<   ded<   d„ Zd„ Z		 	 d+	 	 	 	 	 	 	 d,d„Z
d„ Zd„ Zd„ Zd-d„Zd„ Zd„ Zd.d„Zd„ Zd„ Zd„ Zd-d„Zd„ Zd„ Z e edd d!d"«      d#¬$«      d%„ «       Zd&„ Zd'„ Zd(„ Zd/d)„Zd*„ Zy)0r   a  
    Represents a dummy or fake request. See L{twisted.web.server.Request}.

    @ivar _finishedDeferreds: L{None} or a C{list} of L{Deferreds} which will
        be called back with L{None} when C{finish} is called or which will be
        errbacked if C{processingFailed} is called.

    @type requestheaders: C{Headers}
    @ivar requestheaders: A Headers instance that stores values for all request
        headers.

    @type responseHeaders: C{Headers}
    @ivar responseHeaders: A Headers instance that stores values for all
        response headers.

    @type responseCode: C{int}
    @ivar responseCode: The response code which was passed to
        C{setResponseCode}.

    @type written: C{list} of C{bytes}
    @ivar written: The bytes which have been written to the request.
    s   http://dummy/s   GETNúOptional[IAddress]ÚclientzList[bytes]Úsitepathr0   ÚprepathzDict[bytes, List[bytes]]ÚargszList[Deferred[None]]Ú_finishedDeferredsc                óf   — d| _         | j                   r|j                  «        | j                   rŒyy)zû
        Call an L{IPullProducer}'s C{resumeProducing} method in a
        loop until it unregisters itself.

        @param prod: The producer.
        @type prod: L{IPullProducer}

        @param s: Whether or not the producer is streaming.
        é   N)ÚgoÚresumeProducing)r3   ÚprodÚss      r(   rL   zDummyRequest.registerProducerØ   s'   € ð ˆŒØ�gŠgØ× Ñ Ô"ð �g�gr'   c                ó   — d| _         y )Nr   )rš   r8   s    r(   rN   zDummyRequest.unregisterProducerç   s	   € Øˆ�r'   c                ó  — g | _         g | _        d| _        || _        g | _        d | _        |xs t        d dt        «       ¬«      | _        i | _	        t        «       | _        t        «       | _        d | _        g | _        d| _        d| _        y )Nr   ó   0)r�   ÚuidÚreactors   dummys   HTTP/1.0)r”   r0   ÚfinishedÚpostpathr•   Úsessionr   r   ÚprotoSessionr–   r   ÚrequestHeadersÚresponseHeadersÚresponseCoder—   Ú_serverNameÚclientproto)r3   r¤   r¥   r“   s       r(   r5   zDummyRequest.__init__ê   s�   € ð ˆŒØˆŒØˆŒØ ˆŒØˆŒØˆŒØ#ÒT¤w°D¸dÌEËGÔ'TˆÔØˆŒ	Ü%›iˆÔÜ&›yˆÔØ ˆÔØ"$ˆÔØ#ˆÔØ&ˆÕr'   c                óz   — i }| j                   j                  «       D ]  \  }}|d   ||j                  «       <   Œ |S )ah  
        Return dictionary mapping the names of all received headers to the last
        value received for each.

        Since this method does not return all header information,
        C{self.requestHeaders.getAllRawHeaders()} may be preferred.

        NOTE: This function is a direct copy of
        C{twisted.web.http.Request.getAllRawHeaders}.
        éÿÿÿÿ)r§   ÚgetAllRawHeadersÚlower)r3   rx   ÚkÚvs       r(   ÚgetAllHeaderszDummyRequest.getAllHeadersÿ   sD   € ð ˆØ×'Ñ'×8Ñ8Ó:ò 	'‰DˆAˆqØ!" 2¡ˆG�A—G‘G“IÒð	'àˆr'   c                ó^   — | j                   j                  |j                  «       dg«      d   S )aH  
        Retrieve the value of a request header.

        @type name: C{bytes}
        @param name: The name of the request header for which to retrieve the
            value.  Header names are compared case-insensitively.

        @rtype: C{bytes} or L{None}
        @return: The value of the specified request header.
        Nr   )r§   ÚgetRawHeadersr¯   )r3   rq   s     r(   Ú	getHeaderzDummyRequest.getHeader  s*   € ð ×"Ñ"×0Ñ0°·±³À¸vÓFÀqÑIÐIr'   c                ó<   — | j                   j                  ||«       y)zATODO: make this assert on write() if the header is content-lengthN)r¨   ÚaddRawHeader©r3   rq   rr   s      r(   Ú	setHeaderzDummyRequest.setHeader  s   € à×Ñ×)Ñ)¨$°Õ6r'   c                ó’   — | j                   r| j                   S | j                  rJ d«       ‚| j                  | _         | j                   S )Nz8Session cannot be requested after data has been written.)r¥   r0   r¦   )r3   ÚsessionInterfaces     r(   Ú
getSessionzDummyRequest.getSession   sC   € Ø�<Š<Ø—<‘<Ðà—’ð	FàEó	FØà×(Ñ(ˆŒØ�|‰|Ðr'   c                óz   — |j                  | «      }|t        u ry| j                  |«       | j                  «        y)a   
        Render the given resource as a response to this request.

        This implementation only handles a few of the most common behaviors of
        resources.  It can handle a render method that returns a string or
        C{NOT_DONE_YET}.  It doesn't know anything about the semantics of
        request methods (eg HEAD) nor how to set any particular headers.
        Basically, it's largely broken, but sufficient for some tests at least.
        It should B{not} be expanded to do all the same stuff L{Request} does.
        Instead, L{DummyRequest} should be phased out and L{Request} (or some
        other real code factored in a different way) used.
        N)Úrenderr   r>   Úfinish)r3   ÚresourceÚresults      r(   r¾   zDummyRequest.render)  s2   € ð —‘ Ó&ˆØ”\Ñ!ØØ�
‰
�6ÔØ�‰�r'   c                óp   — t        |t        «      st        d«      ‚| j                  j	                  |«       y )Nzwrite() only accepts bytes)r;   r<   r=   r0   rH   r?   s     r(   r>   zDummyRequest.write<  s*   € Ü˜$¤Ô&ÜÐ8Ó9Ð9Ø�‰×Ñ˜DÕ!r'   c                óP   — t        «       }| j                  j                  |«       |S )z¹
        Return a L{Deferred} which is called back with L{None} when the request
        is finished.  This will probably only work if you haven't called
        C{finish} yet.
        )r   r—   rH   )r3   r£   s     r(   ÚnotifyFinishzDummyRequest.notifyFinishA  s$   € ô $,£:ˆØ×Ñ×&Ñ& xÔ0Øˆr'   c                óœ   — | j                   dz   | _         | j                  �,| j                  }d| _        |D ]  }|j                  d«       Œ yy)z}
        Record that the request is finished and callback and L{Deferred}s
        waiting for notification of this.
        r™   N)r£   r—   Úcallback)r3   Ú	observersÚobss      r(   r¿   zDummyRequest.finishK  sS   € ð
 Ÿ™¨Ñ)ˆŒØ×"Ñ"Ð.Ø×/Ñ/ˆIØ&*ˆDÔ#Ø ò #�Ø—‘˜TÕ"ñ#ð /r'   c                ót   — | j                   �,| j                   }d| _         |D ]  }|j                  |«       Œ yy)zK
        Errback and L{Deferreds} waiting for finish notification.
        N)r—   Úerrback)r3   rw   rÇ   rÈ   s       r(   ÚprocessingFailedzDummyRequest.processingFailedW  sC   € ð ×"Ñ"Ð.Ø×/Ñ/ˆIØ&*ˆDÔ#Ø ò $�Ø—‘˜FÕ#ñ$ð /r'   c                ó$   — |g| j                   |<   y r7   )r–   r¸   s      r(   ÚaddArgzDummyRequest.addArga  s   € Ø ˜'ˆ�	‰	�$Šr'   c                ó–   — | j                   r/J dj                  dj                  | j                   «      «      «       ‚|| _        || _        y)z{
        Set the HTTP status response code, but takes care that this is called
        before any data is written.
        z;Response code cannot be set after data hasbeen written: {}.ú@@@@N)r0   ÚformatÚjoinr©   ÚresponseMessage)r3   rv   Úmessages      r(   ÚsetResponseCodezDummyRequest.setResponseCoded  sH   € ð —’ð	
àK×RÑRØ�K‰K˜Ÿ™Ó%ó
ó	
Øð !ˆÔØ&ˆÕr'   c                óz   — | j                   r/J dj                  dj                  | j                   «      «      «       ‚y )Nz<Last-Modified cannot be set after data has been written: {}.rÏ   ©r0   rÐ   rÑ   )r3   Úwhens     r(   ÚsetLastModifiedzDummyRequest.setLastModifiedq  s6   € à—’ð	
àL×SÑSØ�K‰K˜Ÿ™Ó%ó
ó	
Ø�r'   c                óz   — | j                   r/J dj                  dj                  | j                   «      «      «       ‚y )Nz3ETag cannot be set after data has been written: {}.rÏ   rÖ   )r3   Útags     r(   ÚsetETagzDummyRequest.setETagx  s6   € à—’ð	
àC×JÑJØ�K‰K˜Ÿ™Ó%ó
ó	
Ø�r'   ÚTwistedé   é   r   ÚgetClientAddress)Úreplacementc                óp   — t        | j                  t        t        f«      r| j                  j                  S y)z|
        Return the IPv4 address of the client which made this request, if there
        is one, otherwise L{None}.
        N)r;   r“   r   r   Úhostr8   s    r(   ÚgetClientIPzDummyRequest.getClientIP  s*   € ô �d—k‘k¤K´Ð#=Ô>Ø—;‘;×#Ñ#Ð#Ør'   c                óF   — | j                   €
t        «       S | j                   S )z•
        Return the L{IAddress} of the client that made this request.

        @return: an address.
        @rtype: an L{IAddress} provider.
        )r“   r!   r8   s    r(   rß   zDummyRequest.getClientAddress‰  s    € ð �;‰;ÐÜ“=Ð Ø�{‰{Ðr'   c                ó   — | j                   S )zƒ
        Get a dummy hostname associated to the HTTP request.

        @rtype: C{bytes}
        @returns: a dummy hostname
        )rª   r8   s    r(   ÚgetRequestHostnamezDummyRequest.getRequestHostname”  s   € ð ×ÑÐr'   c                ó   — t        ddd«      S )zz
        Get a dummy transport's host.

        @rtype: C{IPv4Address}
        @returns: a dummy transport's host
        r.   ú	127.0.0.1r,   )r   r8   s    r(   rF   zDummyRequest.getHost�  s   € ô ˜5 +¨rÓ2Ð2r'   c                ó’   — || _         | j                  «       rd}nd}||k(  r|}nd||fz  }| j                  j                  d|«       y)a_  
        Change the host and port the request thinks it's using.

        @type host: C{bytes}
        @param host: The value to which to change the host header.

        @type ssl: C{bool}
        @param ssl: A flag which, if C{True}, indicates that the request is
            considered secure (if C{True}, L{isSecure} will return C{True}).
        i»  r,   s   %b:%ds   hostN)Ú	_forceSSLr‡   r§   r·   )r3   râ   rE   ÚsslÚdefaultÚ
hostHeaders         r(   ÚsetHostzDummyRequest.setHost¦  sN   € ð ˆŒØ�=‰=Œ?Ø‰GàˆGØ�7Š?Ø‰Jà! T¨4 LÑ0ˆJØ×Ñ×(Ñ(¨°*Õ=r'   c                óR   — | j                  t        «       | j                  d|«       y)zu
        Utility function that does a redirect.

        The request should have finish() called after this.
        s   locationN)rÔ   r   r¹   )r3   Úurls     r(   ÚredirectzDummyRequest.redirect¼  s    € ð 	×ÑœUÔ#Ø�‰�{ CÕ(r'   )NN)r¤   zlist[bytes]r¥   zOptional[Session]r“   r’   ÚreturnÚNoner7   )rò   zDeferred[None])r   ) r"   r#   r$   r%   ÚuriÚmethodr“   Ú__annotations__rL   rN   r5   r²   rµ   r¹   r¼   r¾   r>   rÄ   r¿   rË   rÍ   rÔ   rØ   rÛ   r   r   rã   rß   ræ   rF   rî   rñ   r&   r'   r(   r   r   ·   sü   … ñð. €CØ€FØ!%€FÐÓ%ØÓØÓØÓØ
"Ó"Ø,Ó,ò#òð &*Ø%)ð	'àð'ð #ð'ð #ð	'ð
 
ó'ò*ò Jò7óòò&"ó
ò
#ò$ò"ó'ò
ò
ñ ‘˜	 2 q¨!Ó,Ð:LÔMñó Nðò	ò ò3ó>ó,)r'   c                  ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)ÚDummyRequestTestsz$
    Tests for L{DummyRequest}.
    c                ó>  — t        g «      }|j                  «        | j                  | j                  g¬«      }| j	                  dt        |«      «       |\  }| j	                  |j                  d«      t        «       | j	                  |j                  d«      d«       y)zp
        L{DummyRequest.getClientIP} is deprecated in favor of
        L{DummyRequest.getClientAddress}
        )ÚoffendingFunctionsr™   ÚcategoryrÓ   z}twisted.web.test.requesthelper.DummyRequest.getClientIP was deprecated in Twisted 18.4.0; please use getClientAddress insteadN)r   rã   ÚflushWarningsÚtest_getClientIPDeprecatedÚassertEqualÚlenÚgetÚDeprecationWarning)r3   ri   ÚwarningsÚwarnings       r(   rý   z,DummyRequestTests.test_getClientIPDeprecatedË  s‘   € ô ˜rÓ"ˆØ×ÑÔà×%Ñ%Ø $× ?Ñ ?Ð@ð &ó 
ˆð 	×Ñ˜œC ›MÔ*Ø‰	ˆØ×Ñ˜Ÿ™ ZÓ0Ô2DÔEØ×ÑØ�K‰K˜	Ó"ð6õ	
r'   c                ó‚   — t        g «      }t        ddd«      }||_        | j                  d|j	                  «       «       y)z�
        L{DummyRequest.getClientIP} supports IPv6 addresses, just like
        L{twisted.web.http.Request.getClientIP}.
        r.   z::1é90  N)r   r   r“   rþ   rã   )r3   ri   r“   s      r(   Útest_getClientIPSupportsIPv6z.DummyRequestTests.test_getClientIPSupportsIPv6ä  s<   € ô
 ˜rÓ"ˆÜ˜U E¨5Ó1ˆØˆŒà×Ñ˜ × 3Ñ 3Ó 5Õ6r'   c                ón   — t        g «      }|j                  «       }t        j                  t        |«       y)zu
        L{DummyRequest.getClientAddress} returns an L{IAddress}
        provider no C{client} has been set.
        N)r   rß   r   ÚverifyObjectr   )r3   ri   Únulls      r(   Ú"test_getClientAddressWithoutClientz4DummyRequestTests.test_getClientAddressWithoutClientï  s,   € ô
 ˜rÓ"ˆØ×'Ñ'Ó)ˆÜ×ÑœH dÕ+r'   c                ó†   — t        g «      }t        ddd«      }||_        |j                  «       }| j	                  ||«       y)zI
        L{DummyRequest.getClientAddress} returns the C{client}.
        r.   rè   r  N)r   r   r“   rß   ÚassertIs)r3   ri   r“   Úaddresss       r(   Útest_getClientAddressz'DummyRequestTests.test_getClientAddressø  s?   € ô ˜rÓ"ˆÜ˜U K°Ó7ˆØˆŒØ×*Ñ*Ó,ˆØ�‰�g˜vÕ&r'   N)r"   r#   r$   r%   rý   r  r
  r  r&   r'   r(   rø   rø   Æ  s   „ ñò
ò2	7ò,ó'r'   rø   N)1r%   Ú
__future__r   Ú__all__Úior   Útypingr   r   r	   Úzope.interfacer
   r   Úincrementalr   Útwisted.internet.addressr   r   Útwisted.internet.deferr   Útwisted.internet.interfacesr   r   Útwisted.internet.taskr   Útwisted.python.deprecater   Útwisted.trialr   Útwisted.web._responsesr   Útwisted.web.http_headersr   Útwisted.web.resourcer   Útwisted.web.serverr   r   r   ÚtextLinearWhitespaceComponentsÚsanitizedTextÚencodeÚbytesLinearWhitespaceComponentsÚsanitizedBytesr!   r   r   ÚSynchronousTestCaserø   )ÚlwÚ	components   00r(   ú<module>r'     sð   ðñõ #à˜>Ð
*€å ß 'Ñ 'ç .å ç =Ý +ß ?Ý 'Ý /Ý "Ý (Ý ,Ý )ß :Ñ :à:NÖ!O°B C¨ t¨3¢-Ò!OÐ à€à/Mö#Ø"+€I×Ñ�WÕò#Ð ð ×%Ñ% gÓ.€ñ ˆXÓ÷ð ó ð÷Fñ F÷RL)ñ L)ô^:'˜×4Ñ4õ :'ùòQ "Pùò#s   Á3C4Â	C9