o
    ¼>hœ  ã                   @  sd   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ G dd	„ d	eje
ƒZd
S )z5
Tests for L{SSHTransportAddrress} in ssh/address.py
é    )Úannotations)ÚCallable)ÚSSHTransportAddress)ÚIPv4Address)ÚAddressTestCaseMixin)Úunittestc                   @  s.   e Zd ZdZddd„Zdd	d
„Zddd„ZdS )ÚSSHTransportAddressTestszí
    L{twisted.conch.ssh.address.SSHTransportAddress} is what Conch transports
    use to represent the other side of the SSH connection.  This tests the
    basic functionality of that class (string representation, comparison, &c).
    ÚstringFunctionúCallable[[object], str]ÚreturnÚNonec                 C  s.   |   ¡ }||ƒ}||jƒ}|  |d| ¡ dS )z‹
        The string representation of C{SSHTransportAddress} should be
        "SSHTransportAddress(<stringFunction on address>)".
        zSSHTransportAddress(%s)N)ÚbuildAddressÚaddressÚassertEqual)Úselfr	   ÚaddrÚstringValueÚaddressValue© r   ú/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/twisted/conch/test/test_address.pyÚ_stringRepresentation   s   
z.SSHTransportAddressTests._stringRepresentationr   c                 C  ó   t tdddƒƒS )z”
        Create an arbitrary new C{SSHTransportAddress}.  A new instance is
        created for each call, but always for the same address.
        ÚTCPz	127.0.0.1é   ©r   r   ©r   r   r   r   r   "   s   z%SSHTransportAddressTests.buildAddressc                 C  r   )zK
        Like C{buildAddress}, but with a different fixed address.
        r   z	127.0.0.2r   r   r   r   r   r   ÚbuildDifferentAddress)   s   z.SSHTransportAddressTests.buildDifferentAddressN)r	   r
   r   r   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s
    


r   N)r    Ú
__future__r   Útypingr   Útwisted.conch.ssh.addressr   Útwisted.internet.addressr   Ú"twisted.internet.test.test_addressr   Útwisted.trialr   ÚTestCaser   r   r   r   r   Ú<module>   s   