Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/words/test/__pycache__/test_jabberjid.cpython-39.pyc
Ðазад
a k�h� � @ 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 ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/words/test/test_jabberjid.py� test_parse s zJIDParsingTests.test_parsec C s | � tjtjd� dS )z3 Test for failure on no host part. zuser@N��assertRaisesr Z InvalidFormatr r r r r �test_noHost s zJIDParsingTests.test_noHostc C s | � tjtjd� dS )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% s zJIDParsingTests.test_doubleAtc C s | � tjtjd� dS )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. s zJIDParsingTests.test_multipleAtc C s | � t�ddd�d� dS )z@ Test case mapping of the user part of the JID. ZUsErr r r N�r r �prepr r r r �test_prepCaseMapUser: s �z$JIDParsingTests.test_prepCaseMapUserc C s | � t�ddd�d� dS )z@ Test case mapping of the host part of the JID. r �hoSTr r Nr r r r r �test_prepCaseMapHostB s �z$JIDParsingTests.test_prepCaseMapHostc C s0 | � t�ddd�d� | �t�ddd�d� dS )zH Test no case mapping of the resourcce part of the JID. r r! r r r �ResourceN)r r r �assertNotEqualr r r r �test_prepNoCaseMapResourceJ s ��z*JIDParsingTests.test_prepNoCaseMapResourceN) �__name__� __module__�__qualname__r r r r r r"