Changeset 137:8206d7483945


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

Use JIDs everywhere and adjust tests.

Location:
wokkel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/muc.py

    r132 r137  
    363363        self['type'] = 'chat'
    364364        if isinstance(to, jid.JID):
    365             self['to'] = to.userhost()
     365            self['to'] = to.full()
    366366        else:
    367367            self['to'] = to
  • wokkel/test/test_muc.py

    r136 r137  
    404404        Send private messages to muc entities.
    405405        """
    406         other_nick = self.room_jid.userhost()+'/OtherNick'
     406        other_nick = JID(self.room_jid.userhost()+'/OtherNick')
    407407
    408408        self.protocol.chat(other_nick, 'This is a test')
     
    410410        msg = self.stub.output[-1]
    411411
    412         query = "/message[@type='chat' and @to='%s']/body" % other_nick
     412        query = "/message[@type='chat' and @to='%s']/body" % other_nick.full()
    413413        self.assertTrue(xpath.matches(query, msg), 'Wrong message type')
    414414
Note: See TracChangeset for help on using the changeset viewer.