%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/web/test/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/web/test/__pycache__/test_client.cpython-312.pyc

�

Ϫ�f���dZddlmZddlmZmZddlmZmZddl	m
Z
ddlmZeej�Gd�d��ZGd	�d
e
j�Zy)z,
Tests for various parts of L{twisted.web}.
�)�annotations)�implementer�verify)�defer�
interfaces)�unittest)�clientc�0�eZdZdZdd�Zdd�Z				dd�Zy)	�
DummyEndPointz*An endpoint that does not connect anywherec��||_y)N��
someString)�selfrs  �>/usr/lib/python3/dist-packages/twisted/web/test/test_client.py�__init__zDummyEndPoint.__init__s	��$���c�"�d|j�d�S)NzDummyEndPoint(�)r
)rs r�__repr__zDummyEndPoint.__repr__s������0��2�2rc�@�tjt|���S)N)�factory)r�succeed�dict)rrs  r�connectzDummyEndPoint.connects���}�}�T�'�2�3�3rN)r�str�return�None)rr)rzinterfaces.IProtocolFactoryrz6defer.Deferred[dict[str, interfaces.IProtocolFactory]])�__name__�
__module__�__qualname__�__doc__rrr�rrrrs&��5�%�3�4�2�4�	?�4rrc� �eZdZdZdd�Zdd�Zy)�HTTPConnectionPoolTestsz:
    Unit tests for L{client.HTTPConnectionPoolTest}.
    c�b�td�}tjtj|�y)z@L{DummyEndPoint}s implements L{interfaces.IStreamClientEndpoint}�	somethingN)rr�verifyObjectr�IStreamClientEndpoint)r�eps  r�test_implementsz'HTTPConnectionPoolTests.test_implements&s"��
�;�
'�����J�<�<�b�Arc���tjd��}td�}|jd|�}|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��/rN)rr)rrr r!r*r8r"rrr$r$!s���B�
0rr$N)r!�
__future__r�zope.interfacerr�twisted.internetrr�
twisted.trialr�twisted.webr	r(r�TestCaser$r"rr�<module>r?sQ���#�.�.�"��
�Z�
-�
-�.�
4�
4�/�
4� 0�h�/�/�0r

Zerion Mini Shell 1.0