Skip to content

Commit

Permalink
updated for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhashubham95 committed Oct 22, 2022
1 parent 7fd6abe commit 37bedcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion superset/dashboards/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def bulk_delete(models: Optional[List[Dashboard]], commit: bool = True) -> None:
for model in models:
model.slices = []
model.owners = []
model.embedded = []
db.session.merge(model)
# bulk delete itself
try:
Expand Down
6 changes: 3 additions & 3 deletions tests/integration_tests/dashboards/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,16 +814,16 @@ def test_delete_bulk_embedded_dashboards(self):
dashboard_ids.append(
self.insert_dashboard(
f"title{dashboard_name_index}",
f"slug{dashboard_name_index}",
None,
[user.id],
).id
)
self.login(username=user.username)
for dashboard_name_index in range(dashboard_count):
for dashboard_id in dashboard_ids:
# post succeeds and returns value
allowed_domains = ["test.example", "embedded.example"]
resp = self.post_assert_metric(
f"api/v1/dashboard/slug{dashboard_name_index}/embedded",
f"api/v1/dashboard/{dashboard_id}/embedded",
{"allowed_domains": allowed_domains},
"set_embedded",
)
Expand Down

0 comments on commit 37bedcb

Please sign in to comment.