diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-29 15:59:05 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-29 15:59:05 +0100 |
commit | f1bdf40dda5eaba622103b64e749b539e5ce6bf1 (patch) | |
tree | a2a09ff016223528aafa4ce50c9b12698e44c6b1 /tests/rest/test_presence.py | |
parent | No longer need the Freenode verification key file (diff) | |
parent | Unbreak tests after changing storage API (diff) | |
download | synapse-f1bdf40dda5eaba622103b64e749b539e5ce6bf1.tar.xz |
Merge branch 'whois' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'tests/rest/test_presence.py')
-rw-r--r-- | tests/rest/test_presence.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/rest/test_presence.py b/tests/rest/test_presence.py index ea3478ac5d..e2dc3dec81 100644 --- a/tests/rest/test_presence.py +++ b/tests/rest/test_presence.py @@ -51,10 +51,12 @@ class PresenceStateTestCase(unittest.TestCase): datastore=Mock(spec=[ "get_presence_state", "set_presence_state", + "insert_client_ip", ]), http_client=None, resource_for_client=self.mock_resource, resource_for_federation=self.mock_resource, + config=Mock(), ) hs.handlers = JustPresenceHandlers(hs) @@ -65,7 +67,11 @@ class PresenceStateTestCase(unittest.TestCase): self.datastore.get_presence_list = get_presence_list def _get_user_by_token(token=None): - return hs.parse_userid(myid) + return { + "user": hs.parse_userid(myid), + "admin": False, + "device_id": None, + } hs.get_auth().get_user_by_token = _get_user_by_token @@ -131,10 +137,12 @@ class PresenceListTestCase(unittest.TestCase): "set_presence_list_accepted", "del_presence_list", "get_presence_list", + "insert_client_ip", ]), http_client=None, resource_for_client=self.mock_resource, - resource_for_federation=self.mock_resource + resource_for_federation=self.mock_resource, + config=Mock(), ) hs.handlers = JustPresenceHandlers(hs) @@ -147,7 +155,11 @@ class PresenceListTestCase(unittest.TestCase): self.datastore.has_presence_state = has_presence_state def _get_user_by_token(token=None): - return hs.parse_userid(myid) + return { + "user": hs.parse_userid(myid), + "admin": False, + "device_id": None, + } room_member_handler = hs.handlers.room_member_handler = Mock( spec=[ |