o
    ¯b  ã                   @   sL   d 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
é    )ÚSSHTransportAddress)ÚIPv4Address)ÚAddressTestCaseMixin)Úunittestc                   @   s(   e Zd ZdZdd„ Zdd„ Z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).
    c                 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)ÚselfÚstringFunctionÚaddrÚstringValueÚaddressValue© r   úA/usr/lib/python3/dist-packages/twisted/conch/test/test_address.pyÚ_stringRepresentation   s   
z.SSHTransportAddressTests._stringRepresentationc                 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)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s
    
r   N)r   Útwisted.conch.ssh.addressr   Útwisted.internet.addressr   Ú"twisted.internet.test.test_addressr   Útwisted.trialr   ÚTestCaser   r   r   r   r   Ú<module>   s   