mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-19 04:57:47 -04:00
Fix UPSERTs on SQLite 3.24+ (#4477)
This commit is contained in:
parent
88f4df85ca
commit
7072fe3084
8 changed files with 30 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue