summary refs log tree commit diff
path: root/tests/handlers/test_presence.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_presence.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_presence.py')
-rw-r--r--tests/handlers/test_presence.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index c98f877e84..61e9cc7042 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -68,17 +68,18 @@ class PresenceStateTestCase(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,
             handlers=None,
             resource_for_federation=Mock(),
             http_client=None,
         )
         hs.handlers = JustPresenceHandlers(hs)
 
-        yield hs.get_db_pool().prepare()
-
         self.store = hs.get_datastore()
 
         # Mock the RoomMemberHandler