def test_bosh_authentication(self):
     jid = JID('admin@localhost')
     jid.resource = str(random.randint(0, 1000))
     client = BOSHClient(jid, 'admin', 'http://localhost:5280/http-bind/')
     self.assertTrue(client.startSession())
     rid = client.rid
     sid = client.sid
     self.assertTrue(rid is not None)
     self.assertTrue(sid is not None)
Example #2
0
 def prebind(self):
     b_client = BOSHClient(self.jid, self.jpassword, self.bosh)
     if b_client.startSession():
         return b_client.rid, b_client.sid
     return ('', '')
Example #3
0
 def prebind(self):
     b_client = BOSHClient(self.jid, self.jpassword, self.bosh)
     if b_client.startSession():
         return b_client.rid, b_client.sid
     return ('', '')