mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 12:52:04 +00:00
Bugfix for rest presence test - datastore needs to implement profile methods
This commit is contained in:
parent
6797c7f1b1
commit
56424eca5c
@ -274,6 +274,15 @@ class PresenceEventStreamTestCase(unittest.TestCase):
|
|||||||
lambda u: defer.succeed([]))
|
lambda u: defer.succeed([]))
|
||||||
|
|
||||||
self.mock_datastore = hs.get_datastore()
|
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.presence = hs.get_handlers().presence_handler
|
||||||
|
|
||||||
self.u_apple = hs.parse_userid("@apple:test")
|
self.u_apple = hs.parse_userid("@apple:test")
|
||||||
@ -316,6 +325,7 @@ class PresenceEventStreamTestCase(unittest.TestCase):
|
|||||||
"content": {
|
"content": {
|
||||||
"user_id": "@banana:test",
|
"user_id": "@banana:test",
|
||||||
"state": ONLINE,
|
"state": ONLINE,
|
||||||
|
"displayname": "Frank",
|
||||||
"mtime_age": 0,
|
"mtime_age": 0,
|
||||||
}},
|
}},
|
||||||
]}, response)
|
]}, response)
|
||||||
|
Loading…
Reference in New Issue
Block a user