chore!: turn on Versioned Export in config.py (#19142)

* turning off versioned export

* deleted two tests that required version export false

* added tests

* test suggestions
This commit is contained in:
AAfghahi
2022-03-17 13:32:50 -04:00
committed by GitHub
parent 6593a727f2
commit c345029fbc
5 changed files with 17 additions and 34 deletions

View File

@@ -1331,6 +1331,11 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
db.session.delete(user_alpha2)
db.session.commit()
@patch.dict(
"superset.extensions.feature_flag_manager._feature_flags",
{"VERSIONED_EXPORT": False},
clear=True,
)
@pytest.mark.usefixtures(
"load_world_bank_dashboard_with_slices",
"load_birth_names_dashboard_with_slices",
@@ -1376,11 +1381,6 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
db.session.delete(dashboard)
db.session.commit()
@patch.dict(
"superset.extensions.feature_flag_manager._feature_flags",
{"VERSIONED_EXPORT": True},
clear=True,
)
def test_export_bundle(self):
"""
Dashboard API: Test dashboard export
@@ -1396,11 +1396,6 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
buf = BytesIO(rv.data)
assert is_zipfile(buf)
@patch.dict(
"superset.extensions.feature_flag_manager._feature_flags",
{"VERSIONED_EXPORT": True},
clear=True,
)
def test_export_bundle_not_found(self):
"""
Dashboard API: Test dashboard export not found
@@ -1411,11 +1406,6 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
rv = self.client.get(uri)
assert rv.status_code == 404
@patch.dict(
"superset.extensions.feature_flag_manager._feature_flags",
{"VERSIONED_EXPORT": True},
clear=True,
)
def test_export_bundle_not_allowed(self):
"""
Dashboard API: Test dashboard export not allowed