diff options
author | David Teller <D.O.Teller@gmail.com> | 2020-12-11 20:05:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 14:05:15 -0500 |
commit | f14428b25c37e44675edac4a80d7bd1e47112586 (patch) | |
tree | 7565992e70db2c48c7008b2e3fdfe122d315308e /tests/handlers | |
parent | Add type hints to the push module. (#8901) (diff) | |
download | synapse-f14428b25c37e44675edac4a80d7bd1e47112586.tar.xz |
Allow spam-checker modules to be provide async methods. (#8890)
Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner.
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_user_directory.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/handlers/test_user_directory.py b/tests/handlers/test_user_directory.py index 98e5af2072..647a17cb90 100644 --- a/tests/handlers/test_user_directory.py +++ b/tests/handlers/test_user_directory.py @@ -270,7 +270,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase): spam_checker = self.hs.get_spam_checker() class AllowAll: - def check_username_for_spam(self, user_profile): + async def check_username_for_spam(self, user_profile): # Allow all users. return False @@ -283,7 +283,7 @@ class UserDirectoryTestCase(unittest.HomeserverTestCase): # Configure a spam checker that filters all users. class BlockAll: - def check_username_for_spam(self, user_profile): + async def check_username_for_spam(self, user_profile): # All users are spammy. return True |