mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Remove old 'category' metadata
Most of it was incorrect and very inconsistent too. These are not used by our code any more.
This commit is contained in:
parent
33d78fd692
commit
f4f990708f
45 changed files with 737 additions and 770 deletions
|
@ -45,6 +45,18 @@ def test_definitionIds(file_path):
|
|||
definition_id = os.path.basename(file_path).split(".")[0]
|
||||
assert " " not in definition_id # Definition IDs are not allowed to have spaces.
|
||||
|
||||
@pytest.mark.parametrize("file_path", definition_filepaths)
|
||||
def test_noCategory(file_path):
|
||||
"""
|
||||
Categories for definition files have been deprecated. Test that they are not
|
||||
present.
|
||||
:param file_path: The path of the machine definition to test.
|
||||
"""
|
||||
with open(file_path, encoding = "utf-8") as f:
|
||||
json = f.read()
|
||||
metadata = DefinitionContainer.deserializeMetadata(json, "test_container_id")
|
||||
assert "category" not in metadata[0]
|
||||
|
||||
## Tests all definition containers
|
||||
@pytest.mark.parametrize("file_path", machine_filepaths)
|
||||
def test_validateMachineDefinitionContainer(file_path, definition_container):
|
||||
|
@ -59,7 +71,6 @@ def test_validateMachineDefinitionContainer(file_path, definition_container):
|
|||
with patch("UM.VersionUpgradeManager.VersionUpgradeManager.getInstance", MagicMock(return_value = mocked_vum)):
|
||||
assertIsDefinitionValid(definition_container, file_path)
|
||||
|
||||
|
||||
def assertIsDefinitionValid(definition_container, file_path):
|
||||
with open(file_path, encoding = "utf-8") as data:
|
||||
json = data.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue