Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-04-28 10:27:31 +0300
committerGhostkeeper <rubend@tutanota.com>2020-04-28 10:27:31 +0300
commitf4f990708fd7b0d2cd4413c741acf6c09a0f9d23 (patch)
treeeb3a898db218b5ae5362dd04826ae87226b8e8a8 /tests/Settings
parent33d78fd69230cec75b8f257641edcc1ce76de19d (diff)
Remove old 'category' metadata
Most of it was incorrect and very inconsistent too. These are not used by our code any more.
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/TestDefinitionContainer.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Settings/TestDefinitionContainer.py b/tests/Settings/TestDefinitionContainer.py
index 9edf7f3d36..2f2b343338 100644
--- a/tests/Settings/TestDefinitionContainer.py
+++ b/tests/Settings/TestDefinitionContainer.py
@@ -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()