It's considered polite to actually wait for DB prepare before running tests

pull/10/head
Paul "LeoNerd" Evans 2014-09-10 16:50:09 +01:00
parent 53d0f69dc3
commit 9774949cc9
1 changed files with 4 additions and 1 deletions

View File

@ -53,11 +53,14 @@ class SQLiteMemoryDbPool(ConnectionPool, object):
class ProfileStoreTestCase(unittest.TestCase): class ProfileStoreTestCase(unittest.TestCase):
@defer.inlineCallbacks
def setUp(self): def setUp(self):
hs = HomeServer("test", hs = HomeServer("test",
db_pool=SQLiteMemoryDbPool(), db_pool=SQLiteMemoryDbPool(),
) )
hs.get_db_pool().prepare()
yield hs.get_db_pool().prepare()
self.store = ProfileStore(hs) self.store = ProfileStore(hs)