Vitor-Avila commented on code in PR #34993:
URL: https://github.com/apache/superset/pull/34993#discussion_r2324042706


##########
tests/unit_tests/commands/dataset/update_test.py:
##########
@@ -253,38 +276,42 @@ def test_validate_folders_inter_cycle(mocker: 
MockerFixture) -> None:
     )
 
     with pytest.raises(ValidationError) as excinfo:
-        validate_folders(folders=folders, metrics=[], columns=[])
-    assert str(excinfo.value) == "Duplicate UUID in folder structure: uuid2"
+        validate_folders(folders=folders, valid_uuids=set())
+    assert str(excinfo.value) == f"Duplicate UUID in folder structure: 
{folder_uuid2}"
 
 
 @with_feature_flags(DATASET_FOLDERS=True)
 def test_validate_folders_duplicates(mocker: MockerFixture) -> None:
     """
     Test that metrics and columns belong to a single folder.
     """
-    metrics = [mocker.MagicMock(metric_name="count", uuid="uuid2")]
+    from uuid import UUID
+
+    metric_uuid = UUID("22222222-2222-2222-2222-222222222222")
+    folder_uuid1 = UUID("11111111-1111-1111-1111-111111111111")
+    metrics = [mocker.MagicMock(metric_name="count", uuid=metric_uuid)]

Review Comment:
   That's exactly what the test is validating :) 
`test_validate_folders_duplicates`



-- 
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]

Reply via email to