1
0

Make default_config only return a dict representation

This does make mypy happy, and does reduce a bit of confusion, though it's
a shame we have to duplicate the parsing code around everywhere now.

Is there a better way to solve this?
This commit is contained in:
Andrew Morgan
2021-11-16 00:03:46 +00:00
parent 76f5ce9537
commit ca2cfa58d8
4 changed files with 25 additions and 12 deletions

View File

@@ -18,6 +18,7 @@ from unittest.mock import Mock
from twisted.internet import defer
from synapse.config.homeserver import HomeServerConfig
from synapse.storage._base import SQLBaseStore
from synapse.storage.database import DatabasePool
from synapse.storage.engines import create_engine
@@ -47,7 +48,10 @@ class SQLBaseStoreTestCase(unittest.TestCase):
self.db_pool.runWithConnection = runWithConnection
config = default_config(name="test", parse=True)
config_dict = default_config(name="test")
config = HomeServerConfig()
config.parse_config_dict(config_dict)
hs = TestHomeServer("test", config=config)
sqlite_config = {"name": "sqlite3"}