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.
This commit is contained in:
Ghostkeeper 2022-06-08 10:44:37 +02:00
parent 0f12b012cf
commit afbadd9260
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

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