summary refs log tree commit diff
path: root/tests/rest/client/v1/test_profile.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rest/client/v1/test_profile.py')
-rw-r--r--tests/rest/client/v1/test_profile.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/rest/client/v1/test_profile.py b/tests/rest/client/v1/test_profile.py
index 6a2085276a..5cd5767f2e 100644
--- a/tests/rest/client/v1/test_profile.py
+++ b/tests/rest/client/v1/test_profile.py
@@ -20,10 +20,9 @@ from twisted.internet import defer
 
 from mock import Mock, NonCallableMock
 
-from ....utils import MockHttpResource, MockKey
+from ....utils import MockHttpResource, setup_test_homeserver
 
 from synapse.api.errors import SynapseError, AuthError
-from synapse.server import HomeServer
 from synapse.types import UserID
 
 from synapse.rest.client.v1 import profile
@@ -35,6 +34,7 @@ PATH_PREFIX = "/_matrix/client/api/v1"
 class ProfileTestCase(unittest.TestCase):
     """ Tests profile management. """
 
+    @defer.inlineCallbacks
     def setUp(self):
         self.mock_resource = MockHttpResource(prefix=PATH_PREFIX)
         self.mock_handler = Mock(spec=[
@@ -44,17 +44,12 @@ class ProfileTestCase(unittest.TestCase):
             "set_avatar_url",
         ])
 
-        self.mock_config = NonCallableMock()
-        self.mock_config.signing_key = [MockKey()]
-
-        hs = HomeServer("test",
-            db_pool=None,
+        hs = yield setup_test_homeserver(
+            "test",
             http_client=None,
             resource_for_client=self.mock_resource,
             federation=Mock(),
             replication_layer=Mock(),
-            datastore=None,
-            config=self.mock_config,
         )
 
         def _get_user_by_req(request=None):