summary refs log tree commit diff
path: root/tests/rest/client/v2_alpha
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-11 16:43:26 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-11 16:43:26 +0000
commitf2fdcb7c4bb09b447a31985d8b3f3989dac8c0a4 (patch)
tree96cfd120f7bdb70c1045a8080f4f97f3a30bd574 /tests/rest/client/v2_alpha
parentMinor tweaks based on PR feedback. (diff)
parentMerge branch 'bugs/SYN-264' into develop (diff)
downloadsynapse-f2fdcb7c4bb09b447a31985d8b3f3989dac8c0a4.tar.xz
Merge branch 'develop' into application-services
Diffstat (limited to 'tests/rest/client/v2_alpha')
-rw-r--r--tests/rest/client/v2_alpha/__init__.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/rest/client/v2_alpha/__init__.py b/tests/rest/client/v2_alpha/__init__.py
index 7c2b0dfa0e..de5a917e6a 100644
--- a/tests/rest/client/v2_alpha/__init__.py
+++ b/tests/rest/client/v2_alpha/__init__.py
@@ -17,11 +17,12 @@ from tests import unittest
 
 from mock import Mock
 
-from ....utils import MockHttpResource, MockKey
+from ....utils import MockHttpResource, setup_test_homeserver
 
-from synapse.server import HomeServer
 from synapse.types import UserID
 
+from twisted.internet import defer
+
 
 PATH_PREFIX = "/_matrix/client/v2_alpha"
 
@@ -31,19 +32,15 @@ class V2AlphaRestTestCase(unittest.TestCase):
     #   USER_ID = <some string>
     #   TO_REGISTER = [<list of REST servlets to register>]
 
+    @defer.inlineCallbacks
     def setUp(self):
         self.mock_resource = MockHttpResource(prefix=PATH_PREFIX)
 
-        mock_config = Mock()
-        mock_config.signing_key = [MockKey()]
-
-        hs = HomeServer("test",
-            db_pool=None,
+        hs = yield setup_test_homeserver(
             datastore=self.make_datastore_mock(),
             http_client=None,
             resource_for_client=self.mock_resource,
             resource_for_federation=self.mock_resource,
-            config=mock_config,
         )
 
         def _get_user_by_token(token=None):