mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
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
|
return hs
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
c = super().default_config(name)
|
c = super().default_config()
|
||||||
c["worker_app"] = "synapse.app.frontend_proxy"
|
c["worker_app"] = "synapse.app.frontend_proxy"
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ class FederationReaderOpenIDListenerTests(HomeserverTestCase):
|
|||||||
)
|
)
|
||||||
return hs
|
return hs
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
conf = super().default_config(name)
|
conf = super().default_config()
|
||||||
# we're using FederationReaderServer, which uses a SlavedStore, so we
|
# we're using FederationReaderServer, which uses a SlavedStore, so we
|
||||||
# have to tell the FederationHandler not to try to access stuff that is only
|
# have to tell the FederationHandler not to try to access stuff that is only
|
||||||
# in the primary store.
|
# in the primary store.
|
||||||
|
@ -33,8 +33,8 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase):
|
|||||||
login.register_servlets,
|
login.register_servlets,
|
||||||
]
|
]
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
config = super().default_config(name=name)
|
config = super().default_config()
|
||||||
config["limit_remote_rooms"] = {"enabled": True, "complexity": 0.05}
|
config["limit_remote_rooms"] = {"enabled": True, "complexity": 0.05}
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class RegistrationTestCase(unittest.HomeserverTestCase):
|
|||||||
""" Tests the RegistrationHandler. """
|
""" Tests the RegistrationHandler. """
|
||||||
|
|
||||||
def make_homeserver(self, reactor, clock):
|
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
|
# some of the tests rely on us having a user consent version
|
||||||
hs_config["user_consent"] = {
|
hs_config["user_consent"] = {
|
||||||
|
@ -36,8 +36,8 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase):
|
|||||||
servlets = [register.register_servlets]
|
servlets = [register.register_servlets]
|
||||||
url = b"/_matrix/client/r0/register"
|
url = b"/_matrix/client/r0/register"
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
config = super().default_config(name)
|
config = super().default_config()
|
||||||
config["allow_guest_access"] = True
|
config["allow_guest_access"] = True
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase):
|
|||||||
endpoint, to check that the two implementations are compatible.
|
endpoint, to check that the two implementations are compatible.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def default_config(self, *args, **kwargs):
|
def default_config(self):
|
||||||
config = super().default_config(*args, **kwargs)
|
config = super().default_config()
|
||||||
|
|
||||||
# replace the signing key with our own
|
# replace the signing key with our own
|
||||||
self.hs_signing_key = signedjson.key.generate_signing_key("kssk")
|
self.hs_signing_key = signedjson.key.generate_signing_key("kssk")
|
||||||
|
@ -28,7 +28,7 @@ from tests import unittest
|
|||||||
|
|
||||||
class TestResourceLimitsServerNotices(unittest.HomeserverTestCase):
|
class TestResourceLimitsServerNotices(unittest.HomeserverTestCase):
|
||||||
def make_homeserver(self, reactor, clock):
|
def make_homeserver(self, reactor, clock):
|
||||||
hs_config = self.default_config("test")
|
hs_config = self.default_config()
|
||||||
hs_config["server_notices"] = {
|
hs_config["server_notices"] = {
|
||||||
"system_mxid_localpart": "server",
|
"system_mxid_localpart": "server",
|
||||||
"system_mxid_display_name": "test display name",
|
"system_mxid_display_name": "test display name",
|
||||||
|
@ -28,8 +28,8 @@ from tests import unittest
|
|||||||
class TermsTestCase(unittest.HomeserverTestCase):
|
class TermsTestCase(unittest.HomeserverTestCase):
|
||||||
servlets = [register_servlets]
|
servlets = [register_servlets]
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
config = super().default_config(name)
|
config = super().default_config()
|
||||||
config.update(
|
config.update(
|
||||||
{
|
{
|
||||||
"public_baseurl": "https://example.org/",
|
"public_baseurl": "https://example.org/",
|
||||||
|
@ -311,14 +311,11 @@ class HomeserverTestCase(TestCase):
|
|||||||
|
|
||||||
return resource
|
return resource
|
||||||
|
|
||||||
def default_config(self, name="test"):
|
def default_config(self):
|
||||||
"""
|
"""
|
||||||
Get a default HomeServer config dict.
|
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
|
# apply any additional config which was specified via the override_config
|
||||||
# decorator.
|
# decorator.
|
||||||
|
Loading…
Reference in New Issue
Block a user