betodealmeida commented on code in PR #32520:
URL: https://github.com/apache/superset/pull/32520#discussion_r1996303034
##########
tests/integration_tests/datasets/api_tests.py:
##########
@@ -1563,6 +1563,92 @@ def test_update_dataset_sqlalchemy_error(self,
mock_dao_update):
db.session.delete(dataset)
db.session.commit()
+ @with_feature_flags(DATASET_FOLDERS=True)
+ def test_update_dataset_add_folders(self):
+ """
+ Dataset API: Test adding folders to dataset
+ """
+ self.login(username="admin")
+
+ dataset = self.insert_default_dataset()
+ dataset_data = {
+ "folders": [
+ {
+ "type": "folder",
+ "uuid": "b49ac3dd-c79b-42a4-9082-39ee74f3b369",
+ "name": "My metrics",
+ "children": [
+ {
+ "type": "metric",
+ "uuid": dataset.metrics[0].uuid,
+ "name": dataset.metrics[0].metric_name,
+ },
+ ],
+ },
+ {
+ "type": "folder",
+ "uuid": "f5db85fa-75d6-45e5-bdce-c6194db80642",
+ "name": "My columns",
+ "children": [
+ {
+ "type": "folder",
+ "uuid": "b5330233-e323-4157-b767-98b16f00ca93",
+ "name": "Dimensions",
+ "children": [
+ {
+ "type": "column",
+ "uuid": dataset.columns[1].uuid,
+ "name": dataset.columns[1].column_name,
Review Comment:
Right, I considered making them optional.
I included them in the `GET` API because it makes it easier to understand
the API response, even thought they are redundant. But I think we could make
them optional in the `PUT`, and infer types/names from the existing
metrics/columns.
--
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]