Changeset 109:ee2752dca3b2


Ignore:
Timestamp:
Sep 30, 2008, 11:04:00 PM (13 years ago)
Author:
Christopher Zorn <tofu@…>
Branch:
wokkel-muc-client-support-24
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/branches/wokkel-muc-client-support-24@70
Message:

add room configuration, groupchat and some clean up, still needs documentation and a bit more stuff to add re #24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_muc.py

    r108 r109  
    5757        verify.verifyObject(iwokkel.IMUCClient, self.protocol)
    5858
     59
     60    def test_presence(self):
     61        """Test receiving room presence
     62        """
     63        p = muc.UserPresence()
     64       
     65        def userPresence(prs):
     66            self.failUnless(len(prs.children)==1, 'Not enough children')
     67            self.failUnless(getattr(prs,'x',None), 'No x element')
     68                   
     69       
     70        d, self.protocol.receivedUserPresence = calledAsync(userPresence)
     71        self.stub.send(p)
     72        return d
     73
     74
     75    def test_groupChat(self):
     76        """Test receiving room presence
     77        """
     78        m = muc.GroupChat('test@test.com',body='test')
     79       
     80        def groupChat(elem):
     81            self.failUnless(elem.name=='message','Wrong stanza')
     82            self.failUnless(elem['type'] == 'groupchat', 'Wrong attribute')
     83                           
     84       
     85        d, self.protocol.receivedGroupChat = calledAsync(groupChat)
     86        self.stub.send(m)
     87        return d
    5988
    6089
     
    118147        test_nick = 'Nick'
    119148
    120         # p = muc.BasicPresenc(to=)
    121 
    122149        def cb(error):
    123150            self.failUnless(isinstance(error.value,muc.PresenceError), 'Wrong type')
     
    139166        self.stub.send(response)
    140167        return d       
     168
     169    def test_roomConfigure(self):
     170
     171        test_room = 'test'
     172        test_srv  = 'conference.example.org'
     173        test_nick = 'Nick'       
     174
     175        self.fail('Not Implemented')
     176       
     177
Note: See TracChangeset for help on using the changeset viewer.