HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/words/test/__pycache__/test_basechat.cpython-310.pyc
o

�b�	�@s6dZddlmZddlmZmZGdd�dej�ZdS)z)
Tests for L{twisted.words.im.basechat}.
�)�unittest)�basechat�basesupportc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�ChatUITestsz7
    Tests for the L{basechat.ChatUI} chat client.
    cCs4t��|_t�dddddd�|_t�d|j�|_dS)N�
fooAccountF�foo�password�host�port)r�ChatUI�uir�AbstractAccount�account�AbstractPerson�person��self�r�B/usr/lib/python3/dist-packages/twisted/words/test/test_basechat.py�setUps

�zChatUITests.setUpcCsX|�|jjd�|�|jj|j�|j�|jd�|�|jjd�|�|jj|j�dS)z�
        L{basechat.ChatUI.contactChangedNick} on an
        L{twisted.words.im.interfaces.IPerson} who doesn't have an account
        associated with the L{basechat.ChatUI} instance has no effect.
        r�barN)�assertEqualr�namerr�contactChangedNickrrrr�test_contactChangedNickNoKeys
z(ChatUITests.test_contactChangedNickNoKeycCsr|j|jj|jj|jjf<|�|jjd�|�|jj|j�|j�|jd�|�|jjd�|�|jj|j�dS)z
        L{basechat.ChatUI.contactChangedNick} changes the name for an
        L{twisted.words.im.interfaces.IPerson}.
        rrN)rr�personsrrrrrrrr�%test_contactChangedNickNoConversation%sz1ChatUITests.test_contactChangedNickNoConversationcCs�|j|jj|jj|jjf<t�|j|j�}||jj|j<|�|jjd�|�|jj|j�|j�	|jd�|�|jjd�|�|jj|j�dS)a
        If an L{twisted.words.im.interfaces.IPerson} is in a
        L{basechat.Conversation}, L{basechat.ChatUI.contactChangedNick} causes a
        name change for that person in both the L{basechat.Conversation} and the
        L{basechat.ChatUI}.
        rrN)
rrrrrr�Conversation�
conversationsrr)r�conversationrrr�&test_contactChangedNickHasConversation3sz2ChatUITests.test_contactChangedNickHasConversationN)�__name__�
__module__�__qualname__�__doc__rrrr rrrrrs
rN)r$�
twisted.trialr�twisted.words.imrr�TestCaserrrrr�<module>s