summary refs log tree commit diff
path: root/tests/storage/test_base.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-20 14:39:41 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-20 14:39:41 +0000
commit032fed6f42268d37a7b8a78ee3631980fda4aee9 (patch)
treed84356343c5a7ab4b1d0bf2923501f714077e06f /tests/storage/test_base.py
parent1.7.1 (diff)
parentAdd database config class (#6513) (diff)
downloadsynapse-032fed6f42268d37a7b8a78ee3631980fda4aee9.tar.xz
Add database config class (#6513)
* commit '2284eb3a5':
  Add database config class (#6513)
  too many parens
Diffstat (limited to 'tests/storage/test_base.py')
-rw-r--r--tests/storage/test_base.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py

index 537cfe9f64..cdee0a9e60 100644 --- a/tests/storage/test_base.py +++ b/tests/storage/test_base.py
@@ -52,15 +52,17 @@ class SQLBaseStoreTestCase(unittest.TestCase): config = Mock() config._disable_native_upserts = True config.event_cache_size = 1 - config.database_config = {"name": "sqlite3"} - engine = create_engine(config.database_config) + hs = TestHomeServer("test", config=config) + + sqlite_config = {"name": "sqlite3"} + engine = create_engine(sqlite_config) fake_engine = Mock(wraps=engine) fake_engine.can_native_upsert = False - hs = TestHomeServer( - "test", db_pool=self.db_pool, config=config, database_engine=fake_engine - ) - self.datastore = SQLBaseStore(Database(hs), None, hs) + db = Database(Mock(), Mock(config=sqlite_config), fake_engine) + db._db_pool = self.db_pool + + self.datastore = SQLBaseStore(db, None, hs) @defer.inlineCallbacks def test_insert_1col(self):