summary refs log tree commit diff
path: root/tests/rest/client/v1/test_events.py
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/v1/test_events.py
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/v1/test_events.py')
-rw-r--r--tests/rest/client/v1/test_events.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/rest/client/v1/test_events.py b/tests/rest/client/v1/test_events.py
index 0384ffbb3d..f36340121d 100644
--- a/tests/rest/client/v1/test_events.py
+++ b/tests/rest/client/v1/test_events.py
@@ -23,9 +23,8 @@ import synapse.rest.client.v1.events
 import synapse.rest.client.v1.register
 import synapse.rest.client.v1.room
 
-from synapse.server import HomeServer
 
-from ....utils import MockHttpResource, SQLiteMemoryDbPool, MockKey
+from ....utils import MockHttpResource, setup_test_homeserver
 from .utils import RestTestCase
 
 from mock import Mock, NonCallableMock
@@ -113,15 +112,7 @@ class EventStreamPermissionsTestCase(RestTestCase):
     def setUp(self):
         self.mock_resource = MockHttpResource(prefix=PATH_PREFIX)
 
-        self.mock_config = NonCallableMock()
-        self.mock_config.signing_key = [MockKey()]
-
-        db_pool = SQLiteMemoryDbPool()
-        yield db_pool.prepare()
-
-        hs = HomeServer(
-            "test",
-            db_pool=db_pool,
+        hs = yield setup_test_homeserver(
             http_client=None,
             replication_layer=Mock(),
             clock=Mock(spec=[
@@ -133,7 +124,6 @@ class EventStreamPermissionsTestCase(RestTestCase):
             ratelimiter=NonCallableMock(spec_set=[
                 "send_message",
             ]),
-            config=self.mock_config,
         )
         self.ratelimiter = hs.get_ratelimiter()
         self.ratelimiter.send_message.return_value = (True, 0)