diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-02-11 11:37:30 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-02-11 11:37:30 +0000 |
commit | 896253e085751df88e747b29e638916b15cf7a0e (patch) | |
tree | ea62bdb8650946adfa6c9dc4603ce87a39e55e3e /tests/api | |
parent | Merge pull request #60 from matrix-org/single_source_version_and_dependencies (diff) | |
download | synapse-896253e085751df88e747b29e638916b15cf7a0e.tar.xz |
Factor out some of the common homeserver setup code into a
setup_test_homeserver function in utils.
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/test_filtering.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py index babf4c37f1..65b2f590c8 100644 --- a/tests/api/test_filtering.py +++ b/tests/api/test_filtering.py @@ -19,11 +19,9 @@ from twisted.internet import defer from mock import Mock, NonCallableMock from tests.utils import ( - MockHttpResource, MockClock, DeferredMockCallable, SQLiteMemoryDbPool, - MockKey + MockHttpResource, DeferredMockCallable, setup_test_homeserver ) -from synapse.server import HomeServer from synapse.types import UserID from synapse.api.filtering import Filter @@ -34,22 +32,14 @@ class FilteringTestCase(unittest.TestCase): @defer.inlineCallbacks def setUp(self): - db_pool = SQLiteMemoryDbPool() - yield db_pool.prepare() - - self.mock_config = NonCallableMock() - self.mock_config.signing_key = [MockKey()] - self.mock_federation_resource = MockHttpResource() self.mock_http_client = Mock(spec=[]) self.mock_http_client.put_json = DeferredMockCallable() - hs = HomeServer("test", - db_pool=db_pool, + hs = yield setup_test_homeserver( handlers=None, http_client=self.mock_http_client, - config=self.mock_config, keyring=Mock(), ) |