Test fix for ongoing CI issues (#4107)

(cherry picked from commit 3bf5492cb6)
This commit is contained in:
Oliver 2022-12-25 06:39:14 +11:00 committed by GitHub
parent e1d1b51936
commit 07e4f39dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -536,7 +536,9 @@ class APICallMixin:
"""
headers = {'Content-Type': 'application/json'}
if getattr(self, 'API_TOKEN_SETTING'):
headers[self.API_TOKEN] = self.get_setting(self.API_TOKEN_SETTING)
token = self.get_setting(self.API_TOKEN_SETTING)
headers[self.API_TOKEN] = token
headers['Authorization'] = f"{self.API_TOKEN} {token}"
return headers
def api_build_url_args(self, arguments: dict) -> str: