summary refs log tree commit diff
path: root/tests/storage/test_profile.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:50:09 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:50:09 +0100
commit9774949cc989e2a24e2e8070bb4bd299335891ab (patch)
tree2d4ad1fd6724ef815512eaa59ac21c3ca469d8e6 /tests/storage/test_profile.py
parentAlso test avatar_url profile field (diff)
downloadsynapse-9774949cc989e2a24e2e8070bb4bd299335891ab.tar.xz
It's considered polite to actually wait for DB prepare before running tests
Diffstat (limited to 'tests/storage/test_profile.py')
-rw-r--r--tests/storage/test_profile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py
index bca056b295..45c69dafae 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)