Skip to content

Commit

Permalink
revert: test is not overlapping
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmiran137 committed Feb 3, 2021
1 parent f1ca9e2 commit 9d3f41d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/security_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,17 @@ def test_schemas_accessible_by_user_datasource_and_schema_access(self, mock_g):
self.assertIsNotNone(vm)
delete_schema_perm("[examples].[2]")

@pytest.mark.usefixtures("load_world_bank_dashboard_with_slices")
def test_gamma_user_schema_access_to_dashboards(self):
dash = db.session.query(Dashboard).filter_by(slug="world_health").first()
dash.published = True
db.session.commit()

self.login(username="gamma")
data = str(self.client.get("api/v1/dashboard/").data)
self.assertIn("/superset/dashboard/world_health/", data)
self.assertNotIn("/superset/dashboard/births/", data)

def test_gamma_user_schema_access_to_tables(self):
self.login(username="gamma")
data = str(self.client.get("tablemodelview/list/").data)
Expand Down

0 comments on commit 9d3f41d

Please sign in to comment.