From e0c8a52eeca47e7bb954165940f16563a1adb1a5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 11 Apr 2017 16:49:30 +0200 Subject: [PATCH] Fix test_setVariantByIdExists 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 04c28b5075..bb9172cc39 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -597,8 +597,9 @@ def test_setQualityChangesByIdDoesntExist(global_stack): ## Tests setting variants by specifying an ID of a variant that exists. def test_setVariantByIdExists(global_stack, container_registry): - container_registry.typeMetaData = "variant" - global_stack.setVariantById("some_variant") #The container registry always has a container with the ID. + container_registry.return_value = getInstanceContainer(container_type = "variant") + global_stack.setVariantById("InstanceContainer") + assert global_stack.variant.getId() == "InstanceContainer" ## Tests setting variants by specifying an ID of a variant that doesn't exist. def test_setVariantByIdDoesntExist(global_stack):