chore: upgrade black (#19410)

This commit is contained in:
Ville Brofeldt
2022-03-29 20:03:09 +03:00
committed by Ville Brofeldt
parent 1edd5f1343
commit a70f4dc52f
204 changed files with 2161 additions and 604 deletions

View File

@@ -91,11 +91,14 @@ class TestDashboardDatasetSecurity(DashboardTestCase):
username = "gamma"
user = security_manager.find_user(username)
my_owned_dashboard = create_dashboard_to_db(
dashboard_title="My Dashboard", published=False, owners=[user],
dashboard_title="My Dashboard",
published=False,
owners=[user],
)
not_my_owned_dashboard = create_dashboard_to_db(
dashboard_title="Not My Dashboard", published=False,
dashboard_title="Not My Dashboard",
published=False,
)
self.login(user.username)

View File

@@ -41,7 +41,8 @@ CHART_DATA_URI = "api/v1/chart/data"
@mock.patch.dict(
"superset.extensions.feature_flag_manager._feature_flags", DASHBOARD_RBAC=True,
"superset.extensions.feature_flag_manager._feature_flags",
DASHBOARD_RBAC=True,
)
class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
def test_get_dashboard_view__admin_can_access(self):
@@ -402,7 +403,10 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
# assert
self.assert_dashboards_api_response(
response, len(published_dashboards), published_dashboards, draft_dashboards,
response,
len(published_dashboards),
published_dashboards,
draft_dashboards,
)
# post
@@ -446,7 +450,10 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
# assert
self.assert_dashboards_api_response(
response, len(published_dashboards), published_dashboards, draft_dashboards,
response,
len(published_dashboards),
published_dashboards,
draft_dashboards,
)
# post