Ignore:
Timestamp:
Jun 14, 2009, 8:42:38 PM (13 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
wokkel-muc-client-support-24
Message:

More renames, argument consistency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_muc.py

    r130 r131  
    227227        self._createRoom()
    228228        # add user to room
    229         u = muc.User(self.room_jid.resource)
     229        user = muc.User(self.room_jid.resource)
    230230
    231231        room = self.protocol._getRoom(self.room_jid)
    232         room.addUser(u)
     232        room.addUser(user)
    233233
    234234        def userPresence(room, user):
     
    250250
    251251
    252         d = self.protocol.ban(self.room_jid, banned, self.user_jid, reason='Spam')
     252        d = self.protocol.ban(self.room_jid, banned, reason='Spam',
     253                              sender=self.user_jid)
    253254        d.addCallback(cb)
    254255
     
    268269        Kick an entity from a room.
    269270        """
    270         kicked = JID('kick@jabber.org/TroubleMakger')
     271        nick = 'TroubleMakger'
     272
    271273        def cb(kicked):
    272274            self.failUnless(kicked, 'Did not kick user')
    273275
    274 
    275         d = self.protocol.kick(self.room_jid, kicked, self.user_jid, reason='Spam')
     276        d = self.protocol.kick(self.room_jid, nick, reason='Spam',
     277                               sender=self.user_jid)
    276278        d.addCallback(cb)
    277279
     
    331333        msg.addElement('thread', None, thread)
    332334
    333         archive.append(msg)
     335        archive.append({'stanza': msg, 'timestamp': '2002-10-13T23:58:37Z'})
    334336
    335337        msg = domish.Element((None, 'message'))
     
    339341        msg.addElement('thread', None, thread)
    340342
    341         archive.append(msg)
     343        archive.append({'stanza': msg, 'timestamp': '2002-10-13T23:58:43Z'})
    342344
    343345        self.protocol.history(self.room_jid, archive)
     
    405407        Client requesting voice for a room.
    406408        """
    407         self.protocol.voice(self.room_jid.userhost())
     409        self.protocol.voice(self.room_jid)
    408410
    409411        m = self.stub.output[-1]
     
    488490
    489491        """
    490         give_voice = JID('voice@jabber.org/TroubleMakger')
     492        nick = 'TroubleMakger'
    491493        def cb(give_voice):
    492494            self.failUnless(give_voice, 'Did not give voice user')
    493495
    494496
    495         d = self.protocol.grantVoice(self.user_jid, self.room_jid, give_voice)
     497        d = self.protocol.grantVoice(self.room_jid, nick, sender=self.user_jid)
    496498        d.addCallback(cb)
    497499
     
    512514        """
    513515        self._createRoom()
    514         r = self.protocol._getRoom(self.room_jid)
    515         u = muc.User(self.room_jid.resource)
    516         r.addUser(u)
     516        room = self.protocol._getRoom(self.room_jid)
     517        user = muc.User(self.room_jid.resource)
     518        room.addUser(user)
    517519
    518520        def cb(room):
    519521            self.assertEquals(self.test_room, room.roomIdentifier)
    520             u = room.getUser(self.room_jid.resource)
    521             self.failUnless(u is not None, 'User not found')
    522             self.failUnless(u.status == 'testing MUC', 'Wrong status')
    523             self.failUnless(u.show == 'xa', 'Wrong show')
     522            user = room.getUser(self.room_jid.resource)
     523            self.failUnless(user is not None, 'User not found')
     524            self.failUnless(user.status == 'testing MUC', 'Wrong status')
     525            self.failUnless(user.show == 'xa', 'Wrong show')
    524526
    525527        d = self.protocol.status(self.room_jid, 'xa', 'testing MUC')
Note: See TracChangeset for help on using the changeset viewer.