fix: jwt extended broken by flask bump (#28451)

This commit is contained in:
Daniel Vaz Gaspar 2024-05-13 17:51:29 +01:00 committed by GitHub
parent d871b4d267
commit 356a58d5f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -117,7 +117,7 @@ flask-caching==2.1.0
# via apache-superset
flask-compress==1.14
# via apache-superset
flask-jwt-extended==4.3.1
flask-jwt-extended==4.5.3
# via flask-appbuilder
flask-limiter==3.3.1
# via flask-appbuilder

View File

@ -67,6 +67,18 @@ class TestSecurityCsrfApi(SupersetTestCase):
response = self.client.get(uri)
self.assert401(response)
def test_login(self):
"""
Security API: Test get login
"""
uri = f"api/v1/{self.resource_name}/login"
response = self.client.post(
uri,
json={"username": ADMIN_USERNAME, "password": "general", "provider": "db"},
)
assert response.status_code == 200
assert "access_token" in response.json
class TestSecurityGuestTokenApi(SupersetTestCase):
uri = "api/v1/security/guest_token/" # noqa: F541