def test_default_client_supports(self): ''' Test the caps support method of contacts. See test_caps for more enhanced tests. ''' caps_cache.capscache = caps_cache.CapsCache() self.assertTrue( self.contact.supports(NS_MUC), msg="Must not backtrace on simple check for supported feature") self.contact.client_caps = caps_cache.NullClientCaps() self.assertTrue( self.contact.supports(NS_MUC), msg="Must not backtrace on simple check for supported feature")
def __init__(self, jid, account, resource, show, presence, status, name, chatstate, client_caps=None): XMPPEntity.__init__(self, jid, account, resource) self._show = show self._presence = presence self.status = status self.name = name self.client_caps = client_caps or caps_cache.NullClientCaps() # this is contact's chatstate self._chatstate = chatstate self._is_pm_contact = False
def __init__(self, jid, account, resource, show, status, name, our_chatstate, chatstate, client_caps=None): XMPPEntity.__init__(self, jid, account, resource) self.show = show self.status = status self.name = name self.client_caps = client_caps or caps_cache.NullClientCaps() # please read xep-85 http://www.xmpp.org/extensions/xep-0085.html # this holds what WE SEND to contact (our current chatstate) self.our_chatstate = our_chatstate # this is contact's chatstate self.chatstate = chatstate