summary refs log tree commit diff
path: root/tests/rest/client/v1
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-11-05 14:32:26 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2015-11-05 14:32:26 +0000
commitca2f90742d5606f8fc5b7ddd3dd7244c377c1df8 (patch)
tree3094f16ebc3448ba3379cf209ac8b097a5968ecf /tests/rest/client/v1
parentMerge pull request #347 from matrix-org/markjh/check_filter (diff)
downloadsynapse-ca2f90742d5606f8fc5b7ddd3dd7244c377c1df8.tar.xz
Open up /events to anonymous users for room events only
Squash-merge of PR #345 from daniel/anonymousevents
Diffstat (limited to 'tests/rest/client/v1')
-rw-r--r--tests/rest/client/v1/test_presence.py9
-rw-r--r--tests/rest/client/v1/test_typing.py5
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/rest/client/v1/test_presence.py b/tests/rest/client/v1/test_presence.py
index 3e0f294630..7f29d73d95 100644
--- a/tests/rest/client/v1/test_presence.py
+++ b/tests/rest/client/v1/test_presence.py
@@ -47,7 +47,14 @@ class NullSource(object):
     def __init__(self, hs):
         pass
 
-    def get_new_events_for_user(self, user, from_key, limit):
+    def get_new_events(
+            self,
+            user,
+            from_key,
+            room_ids=None,
+            limit=None,
+            is_guest=None
+    ):
         return defer.succeed(([], from_key))
 
     def get_current_key(self, direction='f'):
diff --git a/tests/rest/client/v1/test_typing.py b/tests/rest/client/v1/test_typing.py
index 8433585616..61b9cc743b 100644
--- a/tests/rest/client/v1/test_typing.py
+++ b/tests/rest/client/v1/test_typing.py
@@ -116,7 +116,10 @@ class RoomTypingTestCase(RestTestCase):
         self.assertEquals(200, code)
 
         self.assertEquals(self.event_source.get_current_key(), 1)
-        events = yield self.event_source.get_new_events_for_user(self.user, 0, None)
+        events = yield self.event_source.get_new_events(
+            from_key=0,
+            room_ids=[self.room_id],
+        )
         self.assertEquals(
             events[0],
             [