mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
added memleak test and attempted to fix presence leak
This commit is contained in:
parent
7383f72367
commit
0659ddeff0
2 changed files with 7 additions and 1 deletions
|
@ -281,7 +281,7 @@ class basexmpp(object):
|
|||
name = self.roster[jid].get('name', '')
|
||||
if wasoffline and (show == 'available' or show in presence.showtypes):
|
||||
self.event("got_online", presence)
|
||||
elif not wasoffline and show == 'unavailable':
|
||||
elif show == 'unavailable':
|
||||
logging.debug("%s %s got offline" % (jid, resource))
|
||||
if len(self.roster[jid]['presence']) > 1:
|
||||
del self.roster[jid]['presence'][resource]
|
||||
|
|
|
@ -16,4 +16,10 @@ class testmessagestanzas(unittest.TestCase):
|
|||
msg.reply()
|
||||
self.failUnless(str(msg['to']) == 'room@someservice.someserver.tld')
|
||||
|
||||
def testAttribProperty(self):
|
||||
"Test attrib property returning self"
|
||||
msg = self.m.Message()
|
||||
msg.attrib.attrib.attrib['to'] = 'usr@server.tld'
|
||||
self.failUnless(str(msg['to']) == 'usr@server.tld')
|
||||
|
||||
suite = unittest.TestLoader().loadTestsFromTestCase(testmessagestanzas)
|
||||
|
|
Loading…
Reference in a new issue