summary refs log tree commit diff
path: root/tests/handlers
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-20 13:22:18 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-20 13:22:18 +0100
commit8eca5bd50abc9deb3cd428f3f6b3b8fbeb8bdee1 (patch)
tree65d1a7de2f0b8867d3ac40576833a85764591dd2 /tests/handlers
parentClean up the presence_list checking logic a bit (diff)
downloadsynapse-8eca5bd50abc9deb3cd428f3f6b3b8fbeb8bdee1.tar.xz
Fix the presence tests
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/test_presence.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index ee773797e7..12cf5747a2 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -624,6 +624,7 @@ class PresencePushTestCase(MockedDatastorePresenceTestCase):
     """
     PRESENCE_LIST = {
             'apple': [ "@banana:test", "@clementine:test" ],
+            'banana': [ "@apple:test" ],
     }
 
     @defer.inlineCallbacks
@@ -836,12 +837,7 @@ class PresencePushTestCase(MockedDatastorePresenceTestCase):
 
     @defer.inlineCallbacks
     def test_recv_remote(self):
-        # TODO(paul): Gut-wrenching
-        potato_set = self.handler._remote_recvmap.setdefault(self.u_potato,
-                set())
-        potato_set.add(self.u_apple)
-
-        self.room_members = [self.u_banana, self.u_potato]
+        self.room_members = [self.u_apple, self.u_banana, self.u_potato]
 
         self.assertEquals(self.event_source.get_current_key(), 0)
 
@@ -886,11 +882,8 @@ class PresencePushTestCase(MockedDatastorePresenceTestCase):
     @defer.inlineCallbacks
     def test_recv_remote_offline(self):
         """ Various tests relating to SYN-261 """
-        potato_set = self.handler._remote_recvmap.setdefault(self.u_potato,
-                set())
-        potato_set.add(self.u_apple)
 
-        self.room_members = [self.u_banana, self.u_potato]
+        self.room_members = [self.u_apple, self.u_banana, self.u_potato]
 
         self.assertEquals(self.event_source.get_current_key(), 0)