File: //lib/python3/dist-packages/twisted/words/test/__pycache__/test_jabberjid.cpython-310.pyc
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&