From f08053283e8dab315b19f15505854e946b2618ee Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 11 Apr 2017 16:48:16 +0200 Subject: [PATCH] Fix test_setQualityChangesByIdExists 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 135e9ce392..04c28b5075 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -585,8 +585,9 @@ def test_setQualityByIdDoesntExist(global_stack): ## Tests setting quality changes by specifying an ID of a quality change that # exists. def test_setQualityChangesByIdExists(global_stack, container_registry): - container_registry.typeMetaData = "quality_changes" - global_stack.setQualityChangesById("some_quality_changes") #The container registry always has a container with the ID. + container_registry.return_value = getInstanceContainer(container_type = "quality_changes") + global_stack.setQualityChangesById("InstanceContainer") + assert global_stack.qualityChanges.getId() == "InstanceContainer" ## Tests setting quality changes by specifying an ID of a quality change that # doesn't exist.