fix: Add dataset ID to file name on exports (#34782)

This commit is contained in:
Vitor Avila
2025-08-25 14:54:27 -03:00
committed by GitHub
parent b381992a75
commit 471d9fe737
7 changed files with 77 additions and 8 deletions

View File

@@ -81,12 +81,15 @@ class TestExportDashboardsCommand(SupersetTestCase):
expected_paths = {
"metadata.yaml",
f"dashboards/World_Banks_Data_{example_dashboard.id}.yaml",
"datasets/examples/wb_health_population.yaml",
"databases/examples.yaml",
}
for chart in example_dashboard.slices:
chart_slug = secure_filename(chart.slice_name)
expected_paths.add(f"charts/{chart_slug}_{chart.id}.yaml")
dataset_slug = secure_filename(chart.table.table_name)
expected_paths.add(
f"datasets/examples/{dataset_slug}_{chart.table.id}.yaml"
)
assert expected_paths == set(contents.keys())
metadata = yaml.safe_load(