Ë
    oj  ã                  ó´   — d Z ddlmZ ddlmZmZ ddlmZmZ ddl	m
Z
 ddlmZ  eej                  «       G d„ d«      «       Z G d	„ d
e
j                  «      Zy)z,
Tests for various parts of L{twisted.web}.
é    )Úannotations)ÚimplementerÚverify)ÚdeferÚ
interfaces)Úunittest)Úclientc                  ó0   — e Zd ZdZdd„Zdd„Z	 	 	 	 dd„Zy)	ÚDummyEndPointz*An endpoint that does not connect anywherec                ó   — || _         y )N©Ú
someString)Úselfr   s     ú>/usr/lib/python3/dist-packages/twisted/web/test/test_client.pyÚ__init__zDummyEndPoint.__init__   s	   € Ø$ˆ�ó    c                ó"   — d| j                   › d�S )NzDummyEndPoint(ú)r   )r   s    r   Ú__repr__zDummyEndPoint.__repr__   s   € Ø §¡Ð0°Ð2Ð2r   c                ó@   — t        j                  t        |¬«      «      S )N)Úfactory)r   ÚsucceedÚdict)r   r   s     r   ÚconnectzDummyEndPoint.connect   s   € ô �}‰}œT¨'Ô2Ó3Ð3r   N)r   ÚstrÚreturnÚNone)r   r   )r   zinterfaces.IProtocolFactoryr   z6defer.Deferred[dict[str, interfaces.IProtocolFactory]])Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r   r      s&   „ ñ 5ó%ó3ð4Ø2ð4à	?ô4r   r   c                  ó    — e Zd ZdZdd„Zdd„Zy)ÚHTTPConnectionPoolTestsz:
    Unit tests for L{client.HTTPConnectionPoolTest}.
    c                ób   — t        d«      }t        j                  t        j                  |«       y)z@L{DummyEndPoint}s implements L{interfaces.IStreamClientEndpoint}Ú	somethingN)r   r   ÚverifyObjectr   ÚIStreamClientEndpoint)r   Úeps     r   Útest_implementsz'HTTPConnectionPoolTests.test_implements&   s"   € ä˜;Ó'ˆÜ×ÑœJ×<Ñ<¸bÕAr   c                óØ   — t        j                  d¬«      }t        d«      }|j                  d|«      }| j	                  |«      }t        |«      }| j                  t        |«      |«       y)z2connection L{repr()} includes endpoint's L{repr()}N)ÚreactorÚthis_is_probably_uniqueÚ	someplace)r	   ÚHTTPConnectionPoolr   ÚgetConnectionÚsuccessResultOfÚreprÚassertIn)r   Úpoolr)   ÚdÚresultÚrepresentations         r   Ú	test_reprz!HTTPConnectionPoolTests.test_repr+   sZ   € ä×(Ñ(°Ô6ˆÜÐ4Ó5ˆØ×Ñ˜{¨BÓ/ˆØ×%Ñ% aÓ(ˆÜ˜f›ˆØ�‰”d˜2“h Õ/r   N)r   r   )r   r   r    r!   r*   r8   r"   r   r   r$   r$   !   s   „ ñóBô
0r   r$   N)r!   Ú
__future__r   Úzope.interfacer   r   Útwisted.internetr   r   Útwisted.trialr   Útwisted.webr	   r(   r   ÚTestCaser$   r"   r   r   ú<module>r?      sQ   ðñõ #ç .ç .Ý "Ý ñ ˆZ×-Ñ-Ó.÷4ð 4ó /ð4ô 0˜h×/Ñ/õ 0r   