rusackas commented on code in PR #39946:
URL: https://github.com/apache/superset/pull/39946#discussion_r3753345493
##########
tests/integration_tests/base_tests.py:
##########
@@ -295,6 +295,16 @@ def get_or_create(self, cls, criteria, **kwargs):
def login(self, username, password=DEFAULT_PASSWORD):
return login(self.client, username, password)
+ def get_bearer_auth_header(
+ self, username=ADMIN_USERNAME, password=DEFAULT_PASSWORD
+ ):
+ response = self.client.post(
+ "/api/v1/security/login",
+ json={"username": username, "password": password, "provider":
"db"},
+ )
+ assert response.status_code == 200
+ return {"Authorization": f"Bearer {response.json['access_token']}"}
Review Comment:
This is stale relative to the current diff — `get_bearer_auth_header`
already has both a docstring and full type hints (`username: str =
ADMIN_USERNAME, password: str = DEFAULT_PASSWORD) -> dict[str, str]`, with
`"""Return an Authorization header with a login access token."""` as the
docstring. Resolving.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]