
    tf                        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dS )z,
Tests for various parts of L{twisted.web}.
    )annotations)implementerverify)defer
interfaces)unittest)clientc                  *    e Zd ZdZddZddZddZdS )DummyEndPointz*An endpoint that does not connect anywhere
someStringstrreturnNonec                    || _         d S )Nr   )selfr   s     [/var/www/surfInsights/venv3-11/lib/python3.11/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    22222r   factoryinterfaces.IProtocolFactory6defer.Deferred[dict[str, interfaces.IProtocolFactory]]c                F    t          j        t          |                    S )N)r   )r   succeeddict)r   r   s     r   connectzDummyEndPoint.connect   s     }T'222333r   N)r   r   r   r   )r   r   )r   r   r   r   )__name__
__module____qualname____doc__r   r   r    r   r   r   r      sX         54% % % %3 3 3 34 4 4 4 4 4r   r   c                  "    e Zd ZdZddZddZdS )HTTPConnectionPoolTestsz:
    Unit tests for L{client.HTTPConnectionPoolTest}.
    r   r   c                b    t          d          }t          j        t          j        |           dS )z@L{DummyEndPoint}s implements L{interfaces.IStreamClientEndpoint}	somethingN)r   r   verifyObjectr   IStreamClientEndpoint)r   eps     r   test_implementsz'HTTPConnectionPoolTests.test_implements&   s+    ;''J<bAAAAAr   c                   t          j        d          }t          d          }|                    d|          }|                     |          }t          |          }|                     t          |          |           dS )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+   sv    (666455{B//%%a((fd2hh/////r   N)r   r   )r    r!   r"   r#   r,   r:   r$   r   r   r&   r&   !   sJ         B B B B
0 0 0 0 0 0r   r&   N)r#   
__future__r   zope.interfacer   r   twisted.internetr   r   twisted.trialr   twisted.webr	   r*   r   TestCaser&   r$   r   r   <module>rA      s     # " " " " " . . . . . . . . . . . . . . . . " " " " " "       Z-..4 4 4 4 4 4 4 /.4 0 0 0 0 0h/ 0 0 0 0 0r   