Current File : //usr/lib/python3/dist-packages/twisted/words/test/__pycache__/test_jabbercomponent.cpython-312.pyc |
�
Ϫ�fR6 � �� � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
mZmZ ddl
mZ ddlmZ dd lmZ G d
� d� Z G d� d
ej( � Z G d� dej( � Z G d� dej( � Z G d� de
j0 � Z G d� dej( � Z G d� dej( � Z G d� dej( � Z G d� dej( � Zy)z7
Tests for L{twisted.words.protocols.jabber.component}
� )�sha1)�verifyObject)�failure)�unittest)� component�ijabber� xmlstream)�JID)�domish)�XmlPipec � � e Zd Zd� Zd� Zy)�DummyTransportc � � || _ y �N)�list)�selfr s �I/usr/lib/python3/dist-packages/twisted/words/test/test_jabbercomponent.py�__init__zDummyTransport.__init__ s � ��� � c �: � | j j |� y r )r �append)r �bytess r �writezDummyTransport.write s � �� � ����r N)�__name__�
__module__�__qualname__r r � r r r r s � �� r r c � � e Zd Zd� Zd� Zy)�#ComponentInitiatingInitializerTestsc �� � g | _ t j � | _ d| j _ t j
| j � | _ d| j _ | j j | j _ | j j � | j j d� d| j _ t j | j � | _ y )N�secret�test:componentz�<stream:stream xmlns='test:component' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' id='12345' version='1.0'>�12345)�outputr �
Authenticator�
authenticator�password� XmlStream� namespacer �send�connectionMade�dataReceived�sidr �ComponentInitiatingInitializer�init�r s r �setUpz)ComponentInitiatingInitializerTests.setUp s� � ����&�4�4�6���&.����#�"�,�,�T�-?�-?�@���#3���� �"�k�k�0�0��������%�%�'����#�#�
;�
�
%������<�<�T�^�^�L�� r c � � | j j � }| j d }| j d|j � | j d|j
� | j t
d� j � t |� � g |_ | j j |j � � |S )z?
Test basic operations of component handshake.
���� handshaker"