Move Account Validity callbacks to a dedicated file (#15237)

This commit is contained in:
Andrew Morgan 2023-03-16 10:35:31 +00:00 committed by GitHub
parent f54f877f27
commit 4953cd71df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 154 additions and 106 deletions

View file

@ -1249,9 +1249,8 @@ class AccountStatusTestCase(unittest.HomeserverTestCase):
# account status will fail.
return UserID.from_string(user_id).localpart == "someuser"
self.hs.get_account_validity_handler()._is_user_expired_callbacks.append(
is_expired
)
account_validity_callbacks = self.hs.get_module_api_callbacks().account_validity
account_validity_callbacks.is_user_expired_callbacks.append(is_expired)
self._test_status(
users=[user],