diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-03-15 15:50:37 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-03-19 11:44:43 +0000 |
commit | 13bc1e0746aa0442aa5d43555cbbc2dc75e8ef43 (patch) | |
tree | f48556ca4cb51686322e900a1cc7779455101833 /synapse/config/_base.py | |
parent | Fix resource limits tests (diff) | |
download | synapse-13bc1e0746aa0442aa5d43555cbbc2dc75e8ef43.tar.xz |
Use a regular HomeServerConfig object for unit tests
Rather than using a Mock for the homeserver config, use a genuine HomeServerConfig object. This makes for a more realistic test, and means that we don't have to keep remembering to add things to the mock config every time we add a new config setting.
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r-- | synapse/config/_base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 5613f38e4d..a219a83550 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -405,7 +405,10 @@ class Config(object): self.invoke_all("generate_files", config) return - self.invoke_all("read_config", config) + self.parse_config_dict(config) + + def parse_config_dict(self, config_dict): + self.invoke_all("read_config", config_dict) def find_config_files(search_paths): |