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:
Ghostkeeper 2020-04-28 09:27:31 +02:00
parent 33d78fd692
commit f4f990708f
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
45 changed files with 737 additions and 770 deletions

View file

@ -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()