mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 14:24:56 -04:00
Allow for make_awaitable's return value to be re-used. (#8261)
This commit is contained in:
parent
68cdb3708e
commit
cef00211c8
12 changed files with 56 additions and 70 deletions
|
@ -337,7 +337,7 @@ class UserRegisterTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
store.get_monthly_active_count = Mock(
|
||||
side_effect=lambda: make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.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
|
||||
|
@ -591,7 +591,7 @@ class UserRestTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
self.store.get_monthly_active_count = Mock(
|
||||
side_effect=lambda: make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.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
|
||||
|
@ -631,7 +631,7 @@ class UserRestTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Set monthly active users to the limit
|
||||
self.store.get_monthly_active_count = Mock(
|
||||
side_effect=lambda: make_awaitable(self.hs.config.max_mau_value)
|
||||
return_value=make_awaitable(self.hs.config.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue