From c5cce1078669a526685e265f1ee720f6d95f83e0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 11 Apr 2017 16:46:00 +0200 Subject: [PATCH] Fix test_setQualityByIdExists It now also uses the return_value construct. Contributes to issue CURA-3497. --- tests/Settings/TestGlobalStack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Settings/TestGlobalStack.py b/tests/Settings/TestGlobalStack.py index 4cd0917345..24ea3eee3e 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -573,8 +573,9 @@ def test_setPropertyOtherContainers(target_container, writable_global_stack): ## Tests setting qualities by specifying an ID of a quality that exists. def test_setQualityByIdExists(global_stack, container_registry): - container_registry.typeMetaData = "quality" - global_stack.setQualityById("some_quality") #The container registry always has a container with the ID. + container_registry.return_value = getInstanceContainer(container_type = "quality") + global_stack.setQualityById("InstanceContainer") + global_stack.quality.getId() == "InstanceContainer" ## Tests setting qualities by specifying an ID of a quality that doesn't exist. def test_setQualityByIdDoesntExist(global_stack):