diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-01-28 15:43:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-28 15:43:32 +0000 |
commit | 7072fe30846c47849c3cb142acef03ef3825a892 (patch) | |
tree | c8dcbbdd3752011871c1714c20f5264d60c81b68 /tests/storage/test_base.py | |
parent | Merge pull request #4412 from matrix-org/anoa/dm_room_upgrade (diff) | |
download | synapse-7072fe30846c47849c3cb142acef03ef3825a892.tar.xz |
Fix UPSERTs on SQLite 3.24+ (#4477)
Diffstat (limited to 'tests/storage/test_base.py')
-rw-r--r-- | tests/storage/test_base.py | 7 |
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) |