From d652e4564e2359dbd0341a436af904c4f2d5775d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 11 Apr 2017 16:43:58 +0200 Subject: [PATCH] Fix test_setMaterialByIdExists 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 3354879f74..4cd0917345 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -516,8 +516,9 @@ def test_setDefinitionChangesByIdDoesntExist(global_stack): ## Tests setting materials by specifying an ID of a material that exists. def test_setMaterialByIdExists(global_stack, container_registry): - container_registry.typeMetaData = "material" - global_stack.setMaterialById("some_material") #The container registry always has a container with the ID. + container_registry.return_value = getInstanceContainer(container_type = "material") + global_stack.setMaterialById("InstanceContainer") + assert global_stack.material.getId() == "InstanceContainer" ## Tests setting materials by specifying an ID of a material that doesn't # exist.