Remove spurious "name" parameter to `default_config`
this is never set to anything other than "test", and is a source of unnecessary boilerplate.
This commit is contained in:
parent
1fcf9c6f95
commit
28d9d6e8a9
|
@ -27,8 +27,8 @@ class FrontendProxyTests(HomeserverTestCase):
|
|||
|
||||
return hs
|
||||
|
||||
def default_config(self, name="test"):
|
||||
c = super().default_config(name)
|
||||
def default_config(self):
|
||||
c = super().default_config()
|
||||
c["worker_app"] = "synapse.app.frontend_proxy"
|
||||
return c
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ class FederationReaderOpenIDListenerTests(HomeserverTestCase):
|
|||
)
|
||||
return hs
|
||||
|
||||
def default_config(self, name="test"):
|
||||
conf = super().default_config(name)
|
||||
def default_config(self):
|
||||
conf = super().default_config()
|
||||
# we're using FederationReaderServer, which uses a SlavedStore, so we
|
||||
# have to tell the FederationHandler not to try to access stuff that is only
|
||||
# in the primary store.
|
||||
|
|
|
@ -33,8 +33,8 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
|
|||
login.register_servlets,
|
||||
]
|
||||
|
||||
def default_config(self, name="test"):
|
||||
config = super().default_config(name=name)
|
||||
def default_config(self):
|
||||
config = super().default_config()
|
||||
config["limit_remote_rooms"] = {"enabled": True, "complexity": 0.05}
|
||||
return config
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class RegistrationTestCase(unittest.HomeserverTestCase):
|
|||
""" Tests the RegistrationHandler. """
|
||||
|
||||
def make_homeserver(self, reactor, clock):
|
||||
hs_config = self.default_config("test")
|
||||
hs_config = self.default_config()
|
||||
|
||||
# some of the tests rely on us having a user consent version
|
||||
hs_config["user_consent"] = {
|
||||
|
|
|
@ -36,8 +36,8 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase):
|
|||
servlets = [register.register_servlets]
|
||||
url = b"/_matrix/client/r0/register"
|
||||
|
||||
def default_config(self, name="test"):
|
||||
config = super().default_config(name)
|
||||
def default_config(self):
|
||||
config = super().default_config()
|
||||
config["allow_guest_access"] = True
|
||||
return config
|
||||
|
||||
|
|
|
@ -143,8 +143,8 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase):
|
|||
endpoint, to check that the two implementations are compatible.
|
||||
"""
|
||||
|
||||
def default_config(self, *args, **kwargs):
|
||||
config = super().default_config(*args, **kwargs)
|
||||
def default_config(self):
|
||||
config = super().default_config()
|
||||
|
||||
# replace the signing key with our own
|
||||
self.hs_signing_key = signedjson.key.generate_signing_key("kssk")
|
||||
|
|
|
@ -28,7 +28,7 @@ from tests import unittest
|
|||
|
||||
class TestResourceLimitsServerNotices(unittest.HomeserverTestCase):
|
||||
def make_homeserver(self, reactor, clock):
|
||||
hs_config = self.default_config("test")
|
||||
hs_config = self.default_config()
|
||||
hs_config["server_notices"] = {
|
||||
"system_mxid_localpart": "server",
|
||||
"system_mxid_display_name": "test display name",
|
||||
|
|
|
@ -28,8 +28,8 @@ from tests import unittest
|
|||
class TermsTestCase(unittest.HomeserverTestCase):
|
||||
servlets = [register_servlets]
|
||||
|
||||
def default_config(self, name="test"):
|
||||
config = super().default_config(name)
|
||||
def default_config(self):
|
||||
config = super().default_config()
|
||||
config.update(
|
||||
{
|
||||
"public_baseurl": "https://example.org/",
|
||||
|
|
|
@ -311,14 +311,11 @@ class HomeserverTestCase(TestCase):
|
|||
|
||||
return resource
|
||||
|
||||
def default_config(self, name="test"):
|
||||
def default_config(self):
|
||||
"""
|
||||
Get a default HomeServer config dict.
|
||||
|
||||
Args:
|
||||
name (str): The homeserver name/domain.
|
||||
"""
|
||||
config = default_config(name)
|
||||
config = default_config("test")
|
||||
|
||||
# apply any additional config which was specified via the override_config
|
||||
# decorator.
|
||||
|
|
Loading…
Reference in New Issue