diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-12 11:42:43 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-12 11:42:43 +0000 |
commit | 1ed836cc2b909e0bcd439964173008e9755c4750 (patch) | |
tree | 65862dbcf81107332c0c7c65a2eda86eb6afc9ba /tests/storage/test_roommember.py | |
parent | Merge pull request #59 from matrix-org/hotfixes-v0.6.1f (diff) | |
parent | Expand on caching (diff) | |
download | synapse-1ed836cc2b909e0bcd439964173008e9755c4750.tar.xz |
Merge branch 'release-v0.7.0' of github.com:matrix-org/synapse v0.7.0
Diffstat (limited to 'tests/storage/test_roommember.py')
-rw-r--r-- | tests/storage/test_roommember.py | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py index a23a8189df..811fea544b 100644 --- a/tests/storage/test_roommember.py +++ b/tests/storage/test_roommember.py @@ -17,10 +17,10 @@ from tests import unittest from twisted.internet import defer -from synapse.server import HomeServer from synapse.api.constants import EventTypes, Membership +from synapse.types import UserID, RoomID -from tests.utils import SQLiteMemoryDbPool, MockKey +from tests.utils import setup_test_homeserver from mock import Mock @@ -29,16 +29,7 @@ class RoomMemberStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def setUp(self): - db_pool = SQLiteMemoryDbPool() - yield db_pool.prepare() - - self.mock_config = Mock() - self.mock_config.signing_key = [MockKey()] - - hs = HomeServer( - "test", - db_pool=db_pool, - config=self.mock_config, + hs = yield setup_test_homeserver( resource_for_federation=Mock(), http_client=None, ) @@ -49,13 +40,13 @@ class RoomMemberStoreTestCase(unittest.TestCase): self.handlers = hs.get_handlers() self.message_handler = self.handlers.message_handler - self.u_alice = hs.parse_userid("@alice:test") - self.u_bob = hs.parse_userid("@bob:test") + self.u_alice = UserID.from_string("@alice:test") + self.u_bob = UserID.from_string("@bob:test") # User elsewhere on another host - self.u_charlie = hs.parse_userid("@charlie:elsewhere") + self.u_charlie = UserID.from_string("@charlie:elsewhere") - self.room = hs.parse_roomid("!abc123:test") + self.room = RoomID.from_string("!abc123:test") @defer.inlineCallbacks def inject_room_member(self, room, user, membership, replaces_state=None): |