mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-28 16:19:33 -04:00
Use direct references for configuration variables (part 6). (#10916)
This commit is contained in:
parent
8cef1ab2ac
commit
94b620a5ed
54 changed files with 141 additions and 132 deletions
|
@ -422,7 +422,7 @@ class UserRegisterTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
store.get_monthly_active_count = Mock(
|
||||
return_value=make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.server.max_mau_value)
|
||||
)
|
||||
# Check that the blocking of monthly active users is working as expected
|
||||
# The registration of a new user fails due to the limit
|
||||
|
@ -1485,7 +1485,7 @@ class UserRestTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
self.store.get_monthly_active_count = Mock(
|
||||
return_value=make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.server.max_mau_value)
|
||||
)
|
||||
# Check that the blocking of monthly active users is working as expected
|
||||
# The registration of a new user fails due to the limit
|
||||
|
@ -1522,7 +1522,7 @@ class UserRestTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
self.store.get_monthly_active_count = Mock(
|
||||
return_value=make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.server.max_mau_value)
|
||||
)
|
||||
# Check that the blocking of monthly active users is working as expected
|
||||
# The registration of a new user fails due to the limit
|
||||
|
|
|
@ -516,7 +516,7 @@ class WhoamiTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
appservice = ApplicationService(
|
||||
as_token,
|
||||
self.hs.config.server_name,
|
||||
self.hs.config.server.server_name,
|
||||
id="1234",
|
||||
namespaces={"users": [{"regex": user_id, "exclusive": True}]},
|
||||
sender=user_id,
|
||||
|
|
|
@ -55,7 +55,7 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
|
|||
self.assertTrue(room_version in KNOWN_ROOM_VERSIONS, "" + room_version)
|
||||
|
||||
self.assertEqual(
|
||||
self.config.default_room_version.identifier,
|
||||
self.config.server.default_room_version.identifier,
|
||||
capabilities["m.room_versions"]["default"],
|
||||
)
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class PresenceTestCase(unittest.HomeserverTestCase):
|
|||
PUT to the status endpoint with use_presence enabled will call
|
||||
set_state on the presence handler.
|
||||
"""
|
||||
self.hs.config.use_presence = True
|
||||
self.hs.config.server.use_presence = True
|
||||
|
||||
body = {"presence": "here", "status_msg": "beep boop"}
|
||||
channel = self.make_request(
|
||||
|
|
|
@ -50,7 +50,7 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
appservice = ApplicationService(
|
||||
as_token,
|
||||
self.hs.config.server_name,
|
||||
self.hs.config.server.server_name,
|
||||
id="1234",
|
||||
namespaces={"users": [{"regex": r"@as_user.*", "exclusive": True}]},
|
||||
sender="@as:test",
|
||||
|
@ -74,7 +74,7 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
appservice = ApplicationService(
|
||||
as_token,
|
||||
self.hs.config.server_name,
|
||||
self.hs.config.server.server_name,
|
||||
id="1234",
|
||||
namespaces={"users": [{"regex": r"@as_user.*", "exclusive": True}]},
|
||||
sender="@as:test",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue