Changeset 136:6b8d21adfec2


Ignore:
Timestamp:
Aug 3, 2011, 8:53:25 PM (9 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
wokkel-muc-client-support-24
Message:

Minor test cleanups for consistency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_muc.py

    r135 r136  
    131131
    132132        def cb(room):
    133             self.assertEqual(self.test_room, room.roomIdentifier)
     133            self.assertEquals(self.test_room, room.roomIdentifier)
    134134
    135135        d = self.protocol.join(self.test_srv, self.test_room, self.test_nick)
     
    344344
    345345        def historyReceived(room, user, body, stamp, frm=None):
    346             self.assertTrue(body=='test', "wrong message body")
     346            self.assertEquals('test', body, "wrong message body")
    347347            self.assertTrue(stamp, 'Does not have a history stamp')
    348348
     
    381381            m = self.stub.output.pop()
    382382            # check for delay element
    383             self.assertTrue(m.name=='message', 'Wrong stanza')
     383            self.assertEquals('message', m.name, 'Wrong stanza')
    384384            self.assertTrue(xpath.matches("/message/delay", m), 'Invalid history stanza')
    385385
     
    423423        def cb(iq):
    424424            # check for a result
    425             self.assertTrue(iq['type']=='result', 'We did not get a result')
     425            self.assertEquals('result', iq['type'], 'We did not get a result')
    426426
    427427        d = self.protocol.register(self.room_jid)
     
    456456
    457457        def cb(iq):
    458             self.assertTrue(iq['type']=='result', 'Not a result')
     458            self.assertEquals('result', iq['type'], 'Not a result')
    459459
    460460
     
    483483
    484484        def cb(destroyed):
    485             self.assertTrue(destroyed==True, 'Room not destroyed.')
     485            self.assertTrue(destroyed, 'Room not destroyed.')
    486486
    487487        d = self.protocol.destroy(self.room_jid)
     
    561561
    562562        def cb(room):
    563             self.assertEqual(self.test_room, room.roomIdentifier)
     563            self.assertEquals(self.test_room, room.roomIdentifier)
    564564            user = room.getUser(self.room_jid.resource)
    565565            self.assertNotIdentical(None, user, 'User not found')
    566             self.assertEqual('testing MUC', user.status, 'Wrong status')
    567             self.assertEqual('xa', user.show, 'Wrong show')
     566            self.assertEquals('testing MUC', user.status, 'Wrong status')
     567            self.assertEquals('xa', user.show, 'Wrong show')
    568568
    569569        d = self.protocol.status(self.room_jid, 'xa', 'testing MUC')
     
    572572        prs = self.stub.output[-1]
    573573
    574         self.assertEqual('presence', prs.name, "Need to be presence")
     574        self.assertEquals('presence', prs.name, "Need to be presence")
    575575        self.assertTrue(getattr(prs, 'x', None), 'No muc x element')
    576576
     
    592592        def cb(room):
    593593            members = room.members
    594             self.assertEqual(1, len(members))
     594            self.assertEquals(1, len(members))
    595595            user = members[0]
    596             self.assertEqual(JID(u'hag66@shakespeare.lit'), user.entity)
    597             self.assertEqual(u'thirdwitch', user.nick)
    598             self.assertEqual(u'participant', user.role)
     596            self.assertEquals(JID(u'hag66@shakespeare.lit'), user.entity)
     597            self.assertEquals(u'thirdwitch', user.nick)
     598            self.assertEquals(u'participant', user.role)
    599599
    600600        self._createRoom()
     
    606606        query = iq.query
    607607        self.assertNotIdentical(None, query)
    608         self.assertEqual(NS_MUC_ADMIN, query.uri)
     608        self.assertEquals(NS_MUC_ADMIN, query.uri)
    609609
    610610        response = toResponse(iq, 'result')
Note: See TracChangeset for help on using the changeset viewer.