PHP WebShell

Текущая директория: /usr/lib/python3/dist-packages/twisted/words/test/__pycache__

Просмотр файла: test_jabberxmppstringprep.cpython-310.pyc

o

�b?�@sHddlmZddlmZmZmZGdd�dej�ZGdd�dej�ZdS)�)�unittest)�nameprep�nodeprep�resourceprepc@seZdZdZdd�ZdS)�DeprecationTestszL
    Deprecations in L{twisted.words.protocols.jabber.xmpp_stringprep}.
    cCsdddlm}|j|jgd�}|�t|dd�|�d|dd�|�dt|��|�|d�d	S)
zX
        L{xmpp_stringprep.crippled} is deprecated and always returns C{False}.
        r)�crippled)�offendingFunctions�categoryzrtwisted.words.protocols.jabber.xmpp_stringprep.crippled was deprecated in Twisted 13.1.0: crippled is always False�message�FN)�.twisted.words.protocols.jabber.xmpp_stringprepr�
flushWarnings�
test_crippled�assertEqual�DeprecationWarning�len)�selfr�warnings�r�N/usr/lib/python3/dist-packages/twisted/words/test/test_jabberxmppstringprep.pyrs
�zDeprecationTests.test_crippledN)�__name__�
__module__�__qualname__�__doc__rrrrrrsrc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�XMPPStringPrepTestsa�
    The nodeprep stringprep profile is similar to the resourceprep profile,
    but does an extra mapping of characters (table B.2) and disallows
    more characters (table C.1.1 and eight extra punctuation characters).
    Due to this similarity, the resourceprep tests are more extensive, and
    the nodeprep tests only address the mappings additional restrictions.

    The nameprep profile is nearly identical to the nameprep implementation in
    L{encodings.idna}, but that implementation assumes the C{UseSTD4ASCIIRules}
    flag to be false. This implementation assumes it to be true, and restricts
    the allowed set of characters.  The tests here only check for the
    differences.
    cCs
|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�ttjd	�|�t�d
�d�|�t�d�d�|�ttjd
�|�ttjd�|�ttjd�|�t�d�d�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�t�d�d�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd�|�ttjd �|�ttjd!�|�t�d"�d"�|�ttjd#�dS)$N�resource�Resource� u	Henry ⅣzHenry IVu%foo­͏᠆᠋bar​⁠baz︀︈️�	foobarbaz� u u u​�z�…u᠎uuu󱈴u􏈴u򏿾u􏿿u�u�u⿵úúu‎u‪u󠀁u󠁂ufoo־baru	fooﵐbaruا1uا1بu󠀂)rr�prepare�assertNotEqual�assertRaises�UnicodeError�rrrr�testResourcePrep1sH��z$XMPPStringPrepTests.testResourcePrepcCs8|�t�d�d�|�t�d�d�|�ttjd�dS)N�user�Userzus&er)rrr"r$r%r&rrr�testNodePrep\sz XMPPStringPrepTests.testNodePrepcCs|�ttjd�dS)zQ
        Make sure unassigned code points from Unicode 3.2 are rejected.
        uᴹN)r$r%rr"r&rrr�"test_nodeprepUnassignedInUnicode32asz6XMPPStringPrepTests.test_nodeprepUnassignedInUnicode32cCsj|�t�d�d�|�t�d�d�|�ttjd�|�ttjd�|�ttjd�|�t�d�d�dS)Nzexample.comzExample.comzex@mple.comz-example.comzexample-.comustraße.example.comzstrasse.example.com)rrr"r$r%r&rrr�testNamePrepgs
�z XMPPStringPrepTests.testNamePrepcCs|�t�d�d�dS)z>
        A trailing dot in domain names is preserved.
        zexample.com.N)rrr"r&rrr�test_nameprepTrailingDotrsz,XMPPStringPrepTests.test_nameprepTrailingDotN)	rrrrr'r*r+r,r-rrrrr"s+rN)	�
twisted.trialrrrrr�TestCaserrrrrr�<module>s

Выполнить команду


Для локальной разработки. Не используйте в интернете!