Просмотр исходного кода

Update tests with new required metadata fields

We're changing the validation function of metadata for containers to require the type and name parameters. That needs to be reflected in the tests.

Contributes to issue CURA-3Z4.
Ghostkeeper 2 лет назад
Родитель
Сommit
afbadd9260
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tests/Settings/TestCuraContainerRegistry.py

+ 2 - 2
tests/Settings/TestCuraContainerRegistry.py

@@ -314,8 +314,8 @@ class TestImportProfile:
 
 @pytest.mark.parametrize("metadata,result", [(None, False),
                                              ({}, False),
-                                             ({"setting_version": cura.CuraApplication.CuraApplication.SettingVersion}, True),
-                                             ({"setting_version": 0}, False)])
+                                             ({"setting_version": cura.CuraApplication.CuraApplication.SettingVersion, "type": "some_type", "name": "some_name"}, True),
+                                             ({"setting_version": 0, "type": "some_type", "name": "some_name"}, False)])
 def test_isMetaDataValid(container_registry, metadata, result):
     assert container_registry._isMetadataValid(metadata) == result