# HG changeset patch # User souliane # Date 1410940944 -7200 # Node ID 020e663bc286d3fec3eaae65809375bb03d78780 # Parent 3e234902177ad1e58048d98cfbb162eeb34c6d1f test: fixes FakeSAT for plugin XEP-0033 diff -r 3e234902177a -r 020e663bc286 src/test/helpers.py --- a/src/test/helpers.py Thu Sep 11 15:38:57 2014 +0200 +++ b/src/test/helpers.py Wed Sep 17 10:02:24 2014 +0200 @@ -84,12 +84,31 @@ def sendMessage(self, to_s, msg, subject=None, mess_type='auto', extra={}, profile_key='@NONE@'): self.sendAndStoreMessage({"to": JID(to_s)}) - def sendAndStoreMessage(self, mess_data, skip_send=False, profile=None): - """Save the information to check later to whom messages have been sent and - if entries have been added to the history""" - if not skip_send: - self.sent_messages.append(mess_data["to"]) + def _sendMessageToStream(self, mess_data, client): + """Save the information to check later to whom messages have been sent. + + @param mess_data: message data dictionnary + @param client: profile's client + """ + self.sent_messages.append(mess_data["to"]) + return mess_data + + def _storeMessage(self, mess_data, client): + """Save the information to check later if entries have been added to the history. + + @param mess_data: message data dictionnary + @param client: profile's client + """ self.stored_messages.append(mess_data["to"]) + return mess_data + + def sendMessageToBridge(self, mess_data, client): + """Simulate the message being sent to the frontends. + + @param mess_data: message data dictionnary + @param client: profile's client + """ + return mess_data # TODO def getClient(self, profile_key): """Convenient method to get client from profile key