mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix: Add dataset ID to file name on exports (#34782)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user