summary refs log tree commit diff
path: root/tests/config/test_load.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-10-07 17:20:15 +0100
committerDavid Robertson <davidr@element.io>2021-10-07 17:20:15 +0100
commit0e68a4b162694d7b3ab809b7f834929d93debe60 (patch)
tree35936fad9c5f6255cf2f14d6f7ad3a2afadb5afe /tests/config/test_load.py
parentPin mypy versions (diff)
parentEnsure each cache config test uses separate state. (#11019) (diff)
downloadsynapse-0e68a4b162694d7b3ab809b7f834929d93debe60.tar.xz
Merge branch 'develop' into dmr/typing/wip
Diffstat (limited to 'tests/config/test_load.py')
-rw-r--r--tests/config/test_load.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/config/test_load.py b/tests/config/test_load.py
index 8e49ca26d9..59635de205 100644
--- a/tests/config/test_load.py
+++ b/tests/config/test_load.py
@@ -49,7 +49,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
 
         config = HomeServerConfig.load_config("", ["-c", self.file])
         self.assertTrue(
-            hasattr(config, "macaroon_secret_key"),
+            hasattr(config.key, "macaroon_secret_key"),
             "Want config to have attr macaroon_secret_key",
         )
         if len(config.key.macaroon_secret_key) < 5:
@@ -60,7 +60,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
 
         config = HomeServerConfig.load_or_generate_config("", ["-c", self.file])
         self.assertTrue(
-            hasattr(config, "macaroon_secret_key"),
+            hasattr(config.key, "macaroon_secret_key"),
             "Want config to have attr macaroon_secret_key",
         )
         if len(config.key.macaroon_secret_key) < 5:
@@ -74,8 +74,12 @@ class ConfigLoadingTestCase(unittest.TestCase):
         config1 = HomeServerConfig.load_config("", ["-c", self.file])
         config2 = HomeServerConfig.load_config("", ["-c", self.file])
         config3 = HomeServerConfig.load_or_generate_config("", ["-c", self.file])
-        self.assertEqual(config1.macaroon_secret_key, config2.macaroon_secret_key)
-        self.assertEqual(config1.macaroon_secret_key, config3.macaroon_secret_key)
+        self.assertEqual(
+            config1.key.macaroon_secret_key, config2.key.macaroon_secret_key
+        )
+        self.assertEqual(
+            config1.key.macaroon_secret_key, config3.key.macaroon_secret_key
+        )
 
     def test_disable_registration(self):
         self.generate_config()