Need to prepare() the SQLiteMemoryDbPool before passing it to HomeServer constructor, as DataStore's constructor will want it ready

This commit is contained in:
Paul "LeoNerd" Evans 2014-09-11 15:21:15 +01:00
parent 4385eadc28
commit 493b1e6d3c
6 changed files with 26 additions and 20 deletions

View file

@ -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")