mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-09 17:36:59 +00:00
Fix unit tests.
This commit is contained in:
parent
c163357f38
commit
5b99b471b2
1 changed files with 6 additions and 0 deletions
|
@ -302,6 +302,12 @@ class Auth(object):
|
||||||
|
|
||||||
# Check for application service tokens with a user_id override
|
# Check for application service tokens with a user_id override
|
||||||
try:
|
try:
|
||||||
|
if "user_id" not in request.args:
|
||||||
|
# This has to be done like this rather than relying on it
|
||||||
|
# natively throwing because tests use a Mock for the request
|
||||||
|
# object which doesn't throw :/
|
||||||
|
raise KeyError
|
||||||
|
|
||||||
masquerade_user_id = request.args["user_id"][0]
|
masquerade_user_id = request.args["user_id"][0]
|
||||||
app_service = yield self.store.get_app_service_by_token(
|
app_service = yield self.store.get_app_service_by_token(
|
||||||
access_token
|
access_token
|
||||||
|
|
Loading…
Add table
Reference in a new issue