summary refs log tree commit diff
path: root/tests/config
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-04-11 12:07:23 -0400
committerGitHub <noreply@github.com>2022-04-11 12:07:23 -0400
commit4586119f0b0901be64f08655d3aaaef289a51bde (patch)
tree8150ea6084a6a7a034d272654720333d01b75b9f /tests/config
parentEnable certificate checking during complement tests (#12435) (diff)
downloadsynapse-4586119f0b0901be64f08655d3aaaef289a51bde.tar.xz
Add missing type hints to config classes. (#12402)
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/test_registration_config.py24
-rw-r--r--tests/config/test_server.py8
2 files changed, 22 insertions, 10 deletions
diff --git a/tests/config/test_registration_config.py b/tests/config/test_registration_config.py
index 2acdb6ac61..33d7b70e32 100644
--- a/tests/config/test_registration_config.py
+++ b/tests/config/test_registration_config.py
@@ -37,7 +37,9 @@ class RegistrationConfigTestCase(ConfigFileTestCase):
                     "session_lifetime": "30m",
                     "nonrefreshable_access_token_lifetime": "31m",
                     **config_dict,
-                }
+                },
+                "",
+                "",
             )
 
         with self.assertRaises(ConfigError):
@@ -46,7 +48,9 @@ class RegistrationConfigTestCase(ConfigFileTestCase):
                     "session_lifetime": "30m",
                     "refreshable_access_token_lifetime": "31m",
                     **config_dict,
-                }
+                },
+                "",
+                "",
             )
 
         with self.assertRaises(ConfigError):
@@ -55,7 +59,9 @@ class RegistrationConfigTestCase(ConfigFileTestCase):
                     "session_lifetime": "30m",
                     "refresh_token_lifetime": "31m",
                     **config_dict,
-                }
+                },
+                "",
+                "",
             )
 
         # Then test all the fine conditions
@@ -64,7 +70,9 @@ class RegistrationConfigTestCase(ConfigFileTestCase):
                 "session_lifetime": "31m",
                 "nonrefreshable_access_token_lifetime": "31m",
                 **config_dict,
-            }
+            },
+            "",
+            "",
         )
 
         HomeServerConfig().parse_config_dict(
@@ -72,11 +80,15 @@ class RegistrationConfigTestCase(ConfigFileTestCase):
                 "session_lifetime": "31m",
                 "refreshable_access_token_lifetime": "31m",
                 **config_dict,
-            }
+            },
+            "",
+            "",
         )
 
         HomeServerConfig().parse_config_dict(
-            {"session_lifetime": "31m", "refresh_token_lifetime": "31m", **config_dict}
+            {"session_lifetime": "31m", "refresh_token_lifetime": "31m", **config_dict},
+            "",
+            "",
         )
 
     def test_refuse_to_start_if_open_registration_and_no_verification(self):
diff --git a/tests/config/test_server.py b/tests/config/test_server.py
index b6f21294ba..1f27a54701 100644
--- a/tests/config/test_server.py
+++ b/tests/config/test_server.py
@@ -35,7 +35,7 @@ class ServerConfigTestCase(unittest.TestCase):
     def test_unsecure_listener_no_listeners_open_private_ports_false(self):
         conf = yaml.safe_load(
             ServerConfig().generate_config_section(
-                "che.org", "/data_dir_path", False, None, config_dir_path="CONFDIR"
+                "CONFDIR", "/data_dir_path", "che.org", False, None
             )
         )
 
@@ -55,7 +55,7 @@ class ServerConfigTestCase(unittest.TestCase):
     def test_unsecure_listener_no_listeners_open_private_ports_true(self):
         conf = yaml.safe_load(
             ServerConfig().generate_config_section(
-                "che.org", "/data_dir_path", True, None, config_dir_path="CONFDIR"
+                "CONFDIR", "/data_dir_path", "che.org", True, None
             )
         )
 
@@ -89,7 +89,7 @@ class ServerConfigTestCase(unittest.TestCase):
 
         conf = yaml.safe_load(
             ServerConfig().generate_config_section(
-                "this.one.listens", "/data_dir_path", True, listeners, "CONFDIR"
+                "CONFDIR", "/data_dir_path", "this.one.listens", True, listeners
             )
         )
 
@@ -123,7 +123,7 @@ class ServerConfigTestCase(unittest.TestCase):
 
         conf = yaml.safe_load(
             ServerConfig().generate_config_section(
-                "this.one.listens", "/data_dir_path", True, listeners, "CONFDIR"
+                "CONFDIR", "/data_dir_path", "this.one.listens", True, listeners
             )
         )