diff --git a/tests/Settings/TestExtruderStack.py b/tests/Settings/TestExtruderStack.py index 6360f2e313..db26e693a6 100644 --- a/tests/Settings/TestExtruderStack.py +++ b/tests/Settings/TestExtruderStack.py @@ -321,15 +321,10 @@ def test_setDefinitionByIdDoesntExist(extruder_stack): extruder_stack.setDefinitionById("some_definition") #Container registry is empty now. ## Tests setting materials by specifying an ID of a material that exists. -@pytest.mark.skip def test_setMaterialByIdExists(extruder_stack, container_registry): - original_container_registry = UM.Settings.ContainerStack._containerRegistry - UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of. - - extruder_stack.setMaterialById("some_material") #The container registry always has a container with the ID. - - #Restore. - UM.Settings.ContainerStack._containerRegistry = original_container_registry + container_registry.return_value = getInstanceContainer(container_type = "material") + extruder_stack.setMaterialById("InstanceContainer") + assert extruder_stack.material.getId() == "InstanceContainer" ## Tests setting materials by specifying an ID of a material that doesn't # exist.