rusackas commented on code in PR #32958:
URL: https://github.com/apache/superset/pull/32958#discussion_r3717351857
##########
tests/integration_tests/import_export_tests.py:
##########
@@ -485,6 +485,56 @@ def test_import_override_dashboard_2_slices(self):
"native_filter_configuration": [],
} == json.loads(imported_dash.json_metadata)
+ def test_import_dashboard_expand_all_slices_false(self):
Review Comment:
Added -> None to both new test methods.
##########
tests/integration_tests/import_export_tests.py:
##########
@@ -489,6 +489,56 @@ def test_import_override_dashboard_2_slices(self):
"native_filter_configuration": [],
} == json.loads(imported_dash.json_metadata)
+ def test_import_dashboard_expand_all_slices_false(self):
Review Comment:
Same fix applies here, added the return type.
##########
tests/integration_tests/import_export_tests.py:
##########
@@ -489,6 +489,56 @@ def test_import_override_dashboard_2_slices(self):
"native_filter_configuration": [],
} == json.loads(imported_dash.json_metadata)
+ def test_import_dashboard_expand_all_slices_false(self):
+ dash = self.create_dashboard("dash", slcs=[], id=10005)
+ dash.json_metadata = json.dumps(
+ {
+ "remote_id": 10005,
+ "expand_all_slices": False,
+ }
+ )
+
+ imported_dash_id = import_dashboard(dash, import_time=1991)
+ imported_dash = self.get_dash(imported_dash_id)
+
+ expected_dash = self.create_dashboard("dash", slcs=[], id=10005)
+ make_transient(expected_dash)
+ self.assert_dash_equals(
+ imported_dash, expected_dash, check_position=False,
check_slugs=False
+ )
+ expected_json_metadata = {
+ "remote_id": 10005,
+ "import_time": 1991,
+ "expand_all_slices": False,
+ "native_filter_configuration": [],
+ }
+ assert expected_json_metadata ==
json.loads(imported_dash.json_metadata)
+
+ def test_import_dashboard_expand_all_slices_true(self):
Review Comment:
Added -> None here too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]