Convert synapse.api to async/await (#8031)

This commit is contained in:
Patrick Cloke 2020-08-06 08:30:06 -04:00 committed by GitHub
parent c36228c403
commit d4a7829b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 171 additions and 159 deletions

View file

@ -46,7 +46,7 @@ class RoomTypingTestCase(unittest.HomeserverTestCase):
hs.get_handlers().federation_handler = Mock()
def get_user_by_access_token(token=None, allow_guest=False):
async def get_user_by_access_token(token=None, allow_guest=False):
return {
"user": UserID.from_string(self.auth_user_id),
"token_id": 1,
@ -55,8 +55,8 @@ class RoomTypingTestCase(unittest.HomeserverTestCase):
hs.get_auth().get_user_by_access_token = get_user_by_access_token
def _insert_client_ip(*args, **kwargs):
return defer.succeed(None)
async def _insert_client_ip(*args, **kwargs):
return None
hs.get_datastore().insert_client_ip = _insert_client_ip