diff options
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test_directory.py | 7 | ||||
-rw-r--r-- | tests/storage/test_presence.py | 7 | ||||
-rw-r--r-- | tests/storage/test_profile.py | 7 |
3 files changed, 12 insertions, 9 deletions
diff --git a/tests/storage/test_directory.py b/tests/storage/test_directory.py index 49c41700f6..c4c321dda6 100644 --- a/tests/storage/test_directory.py +++ b/tests/storage/test_directory.py @@ -27,12 +27,13 @@ class DirectoryStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def setUp(self): + db_pool = SQLiteMemoryDbPool() + yield db_pool.prepare() + hs = HomeServer("test", - db_pool=SQLiteMemoryDbPool(), + db_pool=db_pool, ) - yield hs.get_db_pool().prepare() - self.store = DirectoryStore(hs) self.room = hs.parse_roomid("!abcde:test") diff --git a/tests/storage/test_presence.py b/tests/storage/test_presence.py index f0a04ae830..f3fab4fe79 100644 --- a/tests/storage/test_presence.py +++ b/tests/storage/test_presence.py @@ -27,13 +27,14 @@ class PresenceStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def setUp(self): + db_pool = SQLiteMemoryDbPool() + yield db_pool.prepare() + hs = HomeServer("test", clock=MockClock(), - db_pool=SQLiteMemoryDbPool(), + db_pool=db_pool, ) - yield hs.get_db_pool().prepare() - self.store = PresenceStore(hs) self.u_apple = hs.parse_userid("@apple:test") diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py index fa96abf03b..1855278044 100644 --- a/tests/storage/test_profile.py +++ b/tests/storage/test_profile.py @@ -27,12 +27,13 @@ class ProfileStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def setUp(self): + db_pool = SQLiteMemoryDbPool() + yield db_pool.prepare() + hs = HomeServer("test", - db_pool=SQLiteMemoryDbPool(), + db_pool=db_pool, ) - yield hs.get_db_pool().prepare() - self.store = ProfileStore(hs) self.u_frank = hs.parse_userid("@frank:test") |