test: added tests for XEP-0033

This commit is contained in:
souliane 2014-01-05 13:05:31 +01:00
commit 84bfd205dd

View file

@ -68,7 +68,9 @@ class MessageSentAndStored(Exception):
""" Exception to raise if the message has been already sent and stored in the
history by the trigger, so the rest of the process should be stopped. This
should normally be raised by the trigger with the minimal priority """
pass
def __init__(self, reason, mess_data):
Exception(reason)
self.mess_data = mess_data # added for testing purpose
class AbortSendMessage(Exception):
@ -652,10 +654,10 @@ class SAT(service.Service):
def requestServerDisco(self, feature, jid_=None, cache_only=False, profile_key="@NONE"):
"""Discover if a server or its items offer a given feature
@param feature: the feature to check
@param jid_: the jid of the server
@param jid_: the jid of the server, local server if None
@param cache_only: expect the result to be in cache and don't actually
make any request to avoid returning a Deferred. This can be used anytime
for requesting the local server because the data are cached for sure.
make any request. This can be used anytime for requesting a feature on
the local server because the data are cached for sure.
@result: the Deferred entity jid offering the feature, or None
"""
profile = self.memory.getProfileName(profile_key)