Fix tests
parent
495c874fc2
commit
d398c18349
|
@ -58,6 +58,10 @@ class APIClient(object):
|
|||
self.config = config
|
||||
self.oauth_token = get_token(config)
|
||||
|
||||
token_endpoint = (
|
||||
config["funkwhale"].get("token_endpoint") or "/api/v1/oauth/token/"
|
||||
)
|
||||
|
||||
self.session = get_requests_session(
|
||||
config["funkwhale"]["url"],
|
||||
proxy_config=config["proxy"],
|
||||
|
@ -65,9 +69,7 @@ class APIClient(object):
|
|||
base_cls=OAuth2Session,
|
||||
client_id=self.config["funkwhale"]["client_id"],
|
||||
token=self.oauth_token,
|
||||
auto_refresh_url=config["funkwhale"]["url"]
|
||||
+ config["funkwhale"].get("token_endpoint")
|
||||
or "/api/v1/oauth/token/",
|
||||
auto_refresh_url=config["funkwhale"]["url"] + token_endpoint,
|
||||
auto_refresh_kwargs={
|
||||
"client_id": self.config["funkwhale"]["client_id"],
|
||||
"client_secret": self.config["funkwhale"]["client_secret"],
|
||||
|
|
Loading…
Reference in New Issue