Compare commits

...

2 Commits

Author SHA1 Message Date
Beto Dealmeida
5e08f0f052 Fix tests 2026-05-14 15:04:19 -04:00
Beto Dealmeida
c001fb5896 fix: OAuth2 exception should be 403 2026-05-12 14:45:59 -04:00
2 changed files with 4 additions and 4 deletions

View File

@@ -353,10 +353,10 @@ class OAuth2RedirectError(SupersetErrorException):
See the `OAuth2RedirectMessage.tsx` component for more details of how this
information is handled.
TODO (betodealmeida): change status to 403.
"""
status = 403
def __init__(self, url: str, tab_id: str, redirect_uri: str):
super().__init__(
SupersetError(

View File

@@ -2250,7 +2250,7 @@ def test_catalogs_with_oauth2(
security_manager.get_catalogs_accessible_by_user.return_value = {"db2"}
response = client.get("/api/v1/database/1/catalogs/")
assert response.status_code == 500
assert response.status_code == 403
assert response.json == {
"errors": [
{
@@ -2351,7 +2351,7 @@ def test_schemas_with_oauth2(
security_manager.get_schemas_accessible_by_user.return_value = {"schema2"}
response = client.get("/api/v1/database/1/schemas/")
assert response.status_code == 500
assert response.status_code == 403
assert response.json == {
"errors": [
{