amitNielsen commented on a change in pull request #10594:
URL:
https://github.com/apache/incubator-superset/pull/10594#discussion_r477594000
##########
File path: tests/dashboard_tests.py
##########
@@ -465,6 +465,80 @@ def test_users_can_view_published_dashboard(self):
self.revoke_public_access_to_table(table)
self.revoke_access_to_all_dashboards()
+ def test_users_can_view_permitted_dashboard(self):
+ table =
db.session.query(SqlaTable).filter_by(table_name="energy_usage").one()
+ # get a slice from the allowed table
+ slice = db.session.query(Slice).filter_by(slice_name="Energy
Sankey").one()
+ self.grant_public_access_to_table(table)
+ first_dash_slug = f"first_dash_{random()}"
+ second_dash_slug = f"second_dash_{random()}"
+
+ # Create a published and hidden dashboard and add them to the database
+ first_dash = Dashboard()
+ first_dash.dashboard_title = "Published Dashboard"
+ first_dash.slug = first_dash_slug
+ first_dash.slices = [slice]
+ first_dash.published = True
Review comment:
extract to dashboard_tests_utils.create_dashboard()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]