mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
test: World bank examples (#12161)
* add world bank data fixture * fix fixture cleanup, add fixture to dashboard_tests * apply world bank fixtures, fix tests * fix fixture typo, dashboard ids * fix export dashboard metadata * fix test_export_dashboard_command_key_order * fix export dash tests, not add row when no orphans * debug timeout * fixes after merge * fix lint * run pre-commit * comment test for debug * fix save.test.js Co-authored-by: Karol Kostrzewa <karol.kostrzewa@polidea.com>
This commit is contained in:
@@ -49,6 +49,7 @@ from tests.fixtures.importexport import (
|
||||
dataset_metadata_config,
|
||||
)
|
||||
from tests.utils.get_dashboards import get_dashboards_ids
|
||||
from tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices
|
||||
|
||||
DASHBOARDS_FIXTURE_COUNT = 10
|
||||
|
||||
@@ -1102,13 +1103,17 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin):
|
||||
db.session.delete(user_alpha2)
|
||||
db.session.commit()
|
||||
|
||||
@pytest.mark.usefixtures(
|
||||
"load_world_bank_dashboard_with_slices",
|
||||
"load_birth_names_dashboard_with_slices",
|
||||
)
|
||||
def test_export(self):
|
||||
"""
|
||||
Dashboard API: Test dashboard export
|
||||
"""
|
||||
self.login(username="admin")
|
||||
argument = [1, 2]
|
||||
uri = f"api/v1/dashboard/export/?q={prison.dumps(argument)}"
|
||||
dashboards_ids = get_dashboards_ids(db, ["world_health", "births"])
|
||||
uri = f"api/v1/dashboard/export/?q={prison.dumps(dashboards_ids)}"
|
||||
|
||||
# freeze time to ensure filename is deterministic
|
||||
with freeze_time("2020-01-01T00:00:00Z"):
|
||||
|
||||
Reference in New Issue
Block a user