diff --git a/src/test/helpers.py b/src/test/helpers.py index ae12ea54..50ca8de3 100644 --- a/src/test/helpers.py +++ b/src/test/helpers.py @@ -84,12 +84,31 @@ class FakeSAT(object): 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