o
    >h                     @  sv   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 dZG d	d
 d
e
jZdS )z,
Tests for various parts of L{twisted.web}.
    )annotations)implementerverify)defer
interfaces)unittest)clientc                   @  s.   e Zd ZdZdddZddd	ZdddZdS )DummyEndPointz*An endpoint that does not connect anywhere
someStringstrreturnNonec                 C  s
   || _ d S )Nr
   )selfr
    r   |/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/twisted/web/test/test_client.py__init__   s   
zDummyEndPoint.__init__c                 C  s   d| j  dS )NzDummyEndPoint()r   )r   r   r   r   __repr__   s   zDummyEndPoint.__repr__factoryinterfaces.IProtocolFactory6defer.Deferred[dict[str, interfaces.IProtocolFactory]]c                 C  s   t t|dS )N)r   )r   succeeddict)r   r   r   r   r   connect   s   zDummyEndPoint.connectN)r
   r   r   r   )r   r   )r   r   r   r   )__name__
__module____qualname____doc__r   r   r   r   r   r   r   r	      s
    

r	   c                   @  s$   e Zd ZdZd	ddZd	ddZdS )
HTTPConnectionPoolTestsz:
    Unit tests for L{client.HTTPConnectionPoolTest}.
    r   r   c                 C  s   t d}ttj| dS )z@L{DummyEndPoint}s implements L{interfaces.IStreamClientEndpoint}	somethingN)r	   r   verifyObjectr   IStreamClientEndpoint)r   epr   r   r   test_implements&   s   z'HTTPConnectionPoolTests.test_implementsc                 C  sF   t jd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representationr   r   r   	test_repr+   s   
z!HTTPConnectionPoolTests.test_reprN)r   r   )r   r   r   r   r$   r1   r   r   r   r   r   !   s    
r   N)r   
__future__r   zope.interfacer   r   twisted.internetr   r   twisted.trialr   twisted.webr   r"   r	   TestCaser   r   r   r   r   <module>   s   