diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-08 16:57:14 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-08 16:57:14 +0100 |
commit | 22d7a593062eb06081d0cd1dc71e4fc79fc1cb85 (patch) | |
tree | 7b9dc27f4d68e8722894426acfaa30dea8b72d10 | |
parent | Use generic db exceptions rather than sqlite3 specific ones (diff) | |
download | synapse-22d7a593062eb06081d0cd1dc71e4fc79fc1cb85.tar.xz |
Fix tests after commit 9a0579
-rw-r--r-- | tests/storage/test_base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py index 5c17d30148..a64d2b821e 100644 --- a/tests/storage/test_base.py +++ b/tests/storage/test_base.py @@ -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( |