summary refs log tree commit diff
path: root/tests/rest/client
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-07-07 16:18:36 +0100
committerErik Johnston <erik@matrix.org>2015-07-07 16:18:36 +0100
commitf0dd6d4cbddd71f19b4bb20754e302eb48dd21b3 (patch)
tree1ccfd50fd78892cbf387f8c3c06d6efeba28c1aa /tests/rest/client
parentWire together receipts and the notifer/federation (diff)
downloadsynapse-f0dd6d4cbddd71f19b4bb20754e302eb48dd21b3.tar.xz
Fix test.
Diffstat (limited to 'tests/rest/client')
-rw-r--r--tests/rest/client/v1/test_events.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/rest/client/v1/test_events.py b/tests/rest/client/v1/test_events.py
index 445272e323..ac3b0b58ac 100644
--- a/tests/rest/client/v1/test_events.py
+++ b/tests/rest/client/v1/test_events.py
@@ -183,7 +183,17 @@ class EventStreamPermissionsTestCase(RestTestCase):
         )
         self.assertEquals(200, code, msg=str(response))
 
-        self.assertEquals(0, len(response["chunk"]))
+        # We may get a presence event for ourselves down
+        self.assertEquals(
+            0,
+            len([
+                c for c in response["chunk"]
+                if not (
+                    c.get("type") == "m.presence"
+                    and c["content"].get("user_id") == self.user_id
+                )
+            ])
+        )
 
         # joined room (expect all content for room)
         yield self.join(room=room_id, user=self.user_id, tok=self.token)