Fix tests

main
Georg Krause 2022-02-06 11:50:37 +01:00
parent 495c874fc2
commit d398c18349
No known key found for this signature in database
GPG Key ID: FD479B9A4D48E632
1 changed files with 5 additions and 3 deletions

View File

@ -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"],