From 9774949cc989e2a24e2e8070bb4bd299335891ab Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Wed, 10 Sep 2014 16:50:09 +0100 Subject: [PATCH] It's considered polite to actually wait for DB prepare before running tests --- tests/storage/test_profile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py index bca056b29..45c69dafa 100644 --- a/tests/storage/test_profile.py +++ b/tests/storage/test_profile.py @@ -53,11 +53,14 @@ class SQLiteMemoryDbPool(ConnectionPool, object): class ProfileStoreTestCase(unittest.TestCase): + + @defer.inlineCallbacks def setUp(self): hs = HomeServer("test", db_pool=SQLiteMemoryDbPool(), ) - hs.get_db_pool().prepare() + + yield hs.get_db_pool().prepare() self.store = ProfileStore(hs)