Skip to content
Snippets Groups Projects
Commit 22d7a593 authored by Erik Johnston's avatar Erik Johnston
Browse files

Fix tests after commit 9a0579

parent 279a547a
No related branches found
No related tags found
No related merge requests found
......@@ -33,12 +33,18 @@ class SQLBaseStoreTestCase(unittest.TestCase):
def setUp(self):
self.db_pool = Mock(spec=["runInteraction"])
self.mock_txn = Mock()
self.mock_conn = Mock(spec_set=["cursor"])
self.mock_conn.cursor.return_value = self.mock_txn
# Our fake runInteraction just runs synchronously inline
def runInteraction(func, *args, **kwargs):
return defer.succeed(func(self.mock_txn, *args, **kwargs))
self.db_pool.runInteraction = runInteraction
def runWithConnection(func, *args, **kwargs):
return defer.succeed(func(self.mock_conn, *args, **kwargs))
self.db_pool.runWithConnection = runWithConnection
config = Mock()
config.event_cache_size = 1
hs = HomeServer(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment