summary refs log tree commit diff
path: root/tests/handlers/test_profile.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-11 15:21:15 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-11 15:21:15 +0100
commit493b1e6d3ccb9fd806e6d4c22daa1b6657c6ae7f (patch)
treeff07d3afd58acf767ef8208538fbb944f96f9263 /tests/handlers/test_profile.py
parentStart of converting PresenceHandler unit tests to use SQLiteMemoryDbPool - ju... (diff)
downloadsynapse-493b1e6d3ccb9fd806e6d4c22daa1b6657c6ae7f.tar.xz
Need to prepare() the SQLiteMemoryDbPool before passing it to HomeServer constructor, as DataStore's constructor will want it ready
Diffstat (limited to 'tests/handlers/test_profile.py')
-rw-r--r--tests/handlers/test_profile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py
index 8b9685a527..63c9295944 100644
--- a/tests/handlers/test_profile.py
+++ b/tests/handlers/test_profile.py
@@ -49,8 +49,11 @@ class ProfileTestCase(unittest.TestCase):
             self.query_handlers[query_type] = handler
         self.mock_federation.register_query_handler = register_query_handler
 
+        db_pool = SQLiteMemoryDbPool()
+        yield db_pool.prepare()
+
         hs = HomeServer("test",
-                db_pool=SQLiteMemoryDbPool(),
+                db_pool=db_pool,
                 http_client=None,
                 handlers=None,
                 resource_for_federation=Mock(),
@@ -58,8 +61,6 @@ class ProfileTestCase(unittest.TestCase):
             )
         hs.handlers = ProfileHandlers(hs)
 
-        yield hs.get_db_pool().prepare()
-
         self.store = hs.get_datastore()
 
         self.frank = hs.parse_userid("@1234ABCD:test")