U
    
W[]  ã                   @   s\   d Z ddlmZ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
é    )ÚdivisionÚabsolute_import)Úunittest)ÚIPv4Address)ÚAddressTestCaseMixin)ÚSSHTransportAddressc                   @   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)ÚbuildAddressZaddressZassertEqual)ÚselfZstringFunctionZaddrZstringValueZaddressValue© r   úA/usr/lib/python3/dist-packages/twisted/conch/test/test_address.pyÚ_stringRepresentation   s    
ÿz.SSHTransportAddressTests._stringRepresentationc                 C   s   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   s   t tdddƒƒS )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   Z
__future__r   r   Ztwisted.trialr   Ztwisted.internet.addressr   Z"twisted.internet.test.test_addressr   Ztwisted.conch.ssh.addressr   ZTestCaser   r   r   r   r   Ú<module>   s   