mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
perf(export): export generates unnecessary files content (#26765)
This commit is contained in:
@@ -45,9 +45,16 @@ def test_export_assets(
|
||||
),
|
||||
("databases/example.yaml", "<DATABASE CONTENTS>"),
|
||||
]
|
||||
mocked_export_result = [
|
||||
(
|
||||
"metadata.yaml",
|
||||
lambda: "version: 1.0.0\ntype: assets\ntimestamp: '2022-01-01T00:00:00+00:00'\n",
|
||||
),
|
||||
("databases/example.yaml", lambda: "<DATABASE CONTENTS>"),
|
||||
]
|
||||
|
||||
ExportAssetsCommand = mocker.patch("superset.importexport.api.ExportAssetsCommand")
|
||||
ExportAssetsCommand().run.return_value = mocked_contents[:]
|
||||
ExportAssetsCommand().run.return_value = mocked_export_result[:]
|
||||
|
||||
response = client.get("/api/v1/assets/export/")
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user