summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-08-29 19:12:22 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-08-29 19:12:22 +0100
commit56424eca5c2dd6b4a1f71b676bb702ab50e9b893 (patch)
treecfe706b292820e7bbb120903cfe6b79dc87e1f0a /tests
parentTypingNotificationEventSource has to return proper tokens, not int 0 (diff)
downloadsynapse-56424eca5c2dd6b4a1f71b676bb702ab50e9b893.tar.xz
Bugfix for rest presence test - datastore needs to implement profile methods
Diffstat (limited to '')
-rw-r--r--tests/rest/test_presence.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rest/test_presence.py b/tests/rest/test_presence.py
index ab0d580c7c..6631b77973 100644
--- a/tests/rest/test_presence.py
+++ b/tests/rest/test_presence.py
@@ -274,6 +274,15 @@ class PresenceEventStreamTestCase(unittest.TestCase):
                 lambda u: defer.succeed([]))
 
         self.mock_datastore = hs.get_datastore()
+
+        def get_profile_displayname(user_id):
+            return defer.succeed("Frank")
+        self.mock_datastore.get_profile_displayname = get_profile_displayname
+
+        def get_profile_avatar_url(user_id):
+            return defer.succeed(None)
+        self.mock_datastore.get_profile_avatar_url = get_profile_avatar_url
+
         self.presence = hs.get_handlers().presence_handler
 
         self.u_apple = hs.parse_userid("@apple:test")
@@ -316,6 +325,7 @@ class PresenceEventStreamTestCase(unittest.TestCase):
              "content": {
                  "user_id": "@banana:test",
                  "state": ONLINE,
+                 "displayname": "Frank",
                  "mtime_age": 0,
             }},
         ]}, response)