changeset 1206:020e663bc286

test: fixes FakeSAT for plugin XEP-0033
author souliane <souliane@mailoo.org>
date Wed, 17 Sep 2014 10:02:24 +0200
parents 3e234902177a
children 50e6658e2730
files src/test/helpers.py
diffstat 1 files changed, 24 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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