Skip to content

Commit

Permalink
fix: jwt extended broken by flask bump (#28451)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar authored May 13, 2024
1 parent d871b4d commit 356a58d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions tests/integration_tests/security/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ def test_get_csrf_unauthorized(self):
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
Expand Down

0 comments on commit 356a58d

Please sign in to comment.