perf(export): export generates unnecessary files content (#26765)

This commit is contained in:
Stepan
2024-02-22 02:28:38 +03:00
committed by GitHub
parent 744f68d637
commit 2e4f6d3f38
23 changed files with 279 additions and 176 deletions

View File

@@ -70,7 +70,9 @@ class TestExportSavedQueriesCommand(SupersetTestCase):
]
assert expected == list(contents.keys())
metadata = yaml.safe_load(contents["queries/examples/schema1/The_answer.yaml"])
metadata = yaml.safe_load(
contents["queries/examples/schema1/The_answer.yaml"]()
)
assert metadata == {
"schema": "schema1",
"label": "The answer",
@@ -127,7 +129,9 @@ class TestExportSavedQueriesCommand(SupersetTestCase):
command = ExportSavedQueriesCommand([self.example_query.id])
contents = dict(command.run())
metadata = yaml.safe_load(contents["queries/examples/schema1/The_answer.yaml"])
metadata = yaml.safe_load(
contents["queries/examples/schema1/The_answer.yaml"]()
)
assert list(metadata.keys()) == [
"schema",
"label",