summary refs log tree commit diff
path: root/tests/storage/test_base.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2019-01-30 10:56:47 +0000
committerNeil Johnson <neil@matrix.org>2019-01-30 10:56:47 +0000
commitb37e8c9572ef90367bef9e70b66150fdfe243e5d (patch)
tree1207a22a9529d48603317826926bc02866a474a0 /tests/storage/test_base.py
parentisort (diff)
parentMerge branch 'develop' into neilj/room_capabilities (diff)
downloadsynapse-b37e8c9572ef90367bef9e70b66150fdfe243e5d.tar.xz
Merge branch 'neilj/room_capabilities' of github.com:matrix-org/synapse into neilj/room_capabilities
Diffstat (limited to 'tests/storage/test_base.py')
-rw-r--r--tests/storage/test_base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py
index 452d76ddd5..f18db8c384 100644
--- a/tests/storage/test_base.py
+++ b/tests/storage/test_base.py
@@ -49,14 +49,17 @@ class SQLBaseStoreTestCase(unittest.TestCase):
         self.db_pool.runWithConnection = runWithConnection
 
         config = Mock()
-        config._enable_native_upserts = False
+        config._disable_native_upserts = True
         config.event_cache_size = 1
         config.database_config = {"name": "sqlite3"}
+        engine = create_engine(config.database_config)
+        fake_engine = Mock(wraps=engine)
+        fake_engine.can_native_upsert = False
         hs = TestHomeServer(
             "test",
             db_pool=self.db_pool,
             config=config,
-            database_engine=create_engine(config.database_config),
+            database_engine=fake_engine,
         )
 
         self.datastore = SQLBaseStore(None, hs)