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

@@ -67,7 +67,7 @@ class MatrixFederationAgentTests(unittest.TestCase):
self.mock_resolver = Mock()
config_dict = default_config("test", parse=False)
config_dict = default_config("test")
config_dict["federation_custom_ca_list"] = [get_test_ca_cert_file()]
self._config = config = HomeServerConfig()
@@ -957,7 +957,9 @@ class MatrixFederationAgentTests(unittest.TestCase):
self.mock_resolver.resolve_service.side_effect = generate_resolve_service([])
self.reactor.lookups["testserv"] = "1.2.3.4"
config = default_config("test", parse=True)
config_dict = default_config("test")
config = HomeServerConfig()
config.parse_config_dict(config_dict)
# Build a new agent and WellKnownResolver with a different tls factory
tls_factory = FederationPolicyForHTTPS(config)