mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: change 401 response to a 403 for Security Exceptions (#17768)
* fix: change 401 to 403 for Security Exceptions * updating tests to reflect new (proper) status code * another test update
This commit is contained in:
@@ -464,7 +464,7 @@ class TestPostChartDataApi(BaseTestChartDataApi):
|
||||
|
||||
assert rv.status_code == 400
|
||||
|
||||
def test_with_not_permitted_actor__401(self):
|
||||
def test_with_not_permitted_actor__403(self):
|
||||
"""
|
||||
Chart data API: Test chart data query not allowed
|
||||
"""
|
||||
@@ -472,7 +472,7 @@ class TestPostChartDataApi(BaseTestChartDataApi):
|
||||
self.login(username="gamma")
|
||||
rv = self.post_assert_metric(CHART_DATA_URI, self.query_context_payload, "data")
|
||||
|
||||
assert rv.status_code == 401
|
||||
assert rv.status_code == 403
|
||||
assert (
|
||||
rv.json["errors"][0]["error_type"]
|
||||
== SupersetErrorType.DATASOURCE_SECURITY_ACCESS_ERROR
|
||||
|
||||
Reference in New Issue
Block a user