mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:14:52 -04:00
Convert synapse.api to async/await (#8031)
This commit is contained in:
parent
c36228c403
commit
d4a7829b12
22 changed files with 171 additions and 159 deletions
|
@ -241,20 +241,16 @@ class HomeserverTestCase(TestCase):
|
|||
if hasattr(self, "user_id"):
|
||||
if self.hijack_auth:
|
||||
|
||||
def get_user_by_access_token(token=None, allow_guest=False):
|
||||
return succeed(
|
||||
{
|
||||
"user": UserID.from_string(self.helper.auth_user_id),
|
||||
"token_id": 1,
|
||||
"is_guest": False,
|
||||
}
|
||||
)
|
||||
async def get_user_by_access_token(token=None, allow_guest=False):
|
||||
return {
|
||||
"user": UserID.from_string(self.helper.auth_user_id),
|
||||
"token_id": 1,
|
||||
"is_guest": False,
|
||||
}
|
||||
|
||||
def get_user_by_req(request, allow_guest=False, rights="access"):
|
||||
return succeed(
|
||||
create_requester(
|
||||
UserID.from_string(self.helper.auth_user_id), 1, False, None
|
||||
)
|
||||
async def get_user_by_req(request, allow_guest=False, rights="access"):
|
||||
return create_requester(
|
||||
UserID.from_string(self.helper.auth_user_id), 1, False, None
|
||||
)
|
||||
|
||||
self.hs.get_auth().get_user_by_req = get_user_by_req
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue