summary refs log tree commit diff
path: root/tests/handlers
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-30 11:13:58 +0000
committerMark Haines <mark.haines@matrix.org>2014-10-30 11:13:58 +0000
commit7c063995123297dfd569f68e0f195cad7fa327c5 (patch)
tree2ce0eb2215707808c689ac9ea9787fff8a9c7664 /tests/handlers
parentPep8 and a few doc strings (diff)
parentFix pep8 warnings (diff)
downloadsynapse-7c063995123297dfd569f68e0f195cad7fa327c5.tar.xz
Merge branch 'develop' into request_logging
Conflicts:
	synapse/config/logger.py
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/test_presence.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index 1850deacf5..fdc2e8de4a 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -29,6 +29,7 @@ from synapse.server import HomeServer
 from synapse.api.constants import PresenceState
 from synapse.api.errors import SynapseError
 from synapse.handlers.presence import PresenceHandler, UserPresenceCache
+from synapse.streams.config import SourcePaginationConfig
 
 
 OFFLINE = PresenceState.OFFLINE
@@ -676,6 +677,21 @@ class PresencePushTestCase(unittest.TestCase):
             msg="Presence event should be visible to self-reflection"
         )
 
+        config = SourcePaginationConfig(from_key=1, to_key=0)
+        (chunk, _) = yield self.event_source.get_pagination_rows(
+            self.u_apple, config, None
+        )
+        self.assertEquals(chunk,
+            [
+                {"type": "m.presence",
+                 "content": {
+                     "user_id": "@apple:test",
+                     "presence": ONLINE,
+                     "last_active_ago": 0,
+                }},
+            ]
+        )
+
         # Banana sees it because of presence subscription
         (events, _) = yield self.event_source.get_new_events_for_user(
             self.u_banana, 0, None