
    Vh                        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     L/home/dcms/DCMS/lib/python3.12/site-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d2h/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 0h// 0r   