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
2 changed files with 13 additions and 1 deletions

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