summary refs log tree commit diff
path: root/tests/rest/client/v1/test_profile.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-05 15:53:10 +0000
committerErik Johnston <erik@matrix.org>2019-12-05 15:57:28 +0000
commit4ca3ef10b9a8d15cf351d67d574088d944c2e3b1 (patch)
treec63740471aca47f9805633ac81a85ebf23e1de07 /tests/rest/client/v1/test_profile.py
parentPort rest/v1 to async/await (diff)
downloadsynapse-4ca3ef10b9a8d15cf351d67d574088d944c2e3b1.tar.xz
Fixup tests
Diffstat (limited to 'tests/rest/client/v1/test_profile.py')
-rw-r--r--tests/rest/client/v1/test_profile.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/rest/client/v1/test_profile.py b/tests/rest/client/v1/test_profile.py
index 140d8b3772..12c5e95cb5 100644
--- a/tests/rest/client/v1/test_profile.py
+++ b/tests/rest/client/v1/test_profile.py
@@ -52,6 +52,14 @@ class MockHandlerProfileTestCase(unittest.TestCase):
             ]
         )
 
+        self.mock_handler.get_displayname.return_value = defer.succeed(Mock())
+        self.mock_handler.set_displayname.return_value = defer.succeed(Mock())
+        self.mock_handler.get_avatar_url.return_value = defer.succeed(Mock())
+        self.mock_handler.set_avatar_url.return_value = defer.succeed(Mock())
+        self.mock_handler.check_profile_query_allowed.return_value = defer.succeed(
+            Mock()
+        )
+
         hs = yield setup_test_homeserver(
             self.addCleanup,
             "test",
@@ -63,7 +71,7 @@ class MockHandlerProfileTestCase(unittest.TestCase):
         )
 
         def _get_user_by_req(request=None, allow_guest=False):
-            return synapse.types.create_requester(myid)
+            return defer.succeed(synapse.types.create_requester(myid))
 
         hs.get_auth().get_user_by_req = _get_user_by_req