From 0c232c94620b26ce1d1f88bdd9e0f69c25265af8 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 12 Apr 2017 12:06:02 +0200 Subject: [PATCH] ExtruderStack requires a next stack, so make sure it has that in tests --- tests/Settings/TestExtruderStack.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Settings/TestExtruderStack.py b/tests/Settings/TestExtruderStack.py index 41aefcbd05..c49448b030 100644 --- a/tests/Settings/TestExtruderStack.py +++ b/tests/Settings/TestExtruderStack.py @@ -263,6 +263,7 @@ def test_getPropertyFallThrough(extruder_stack): extruder_stack.variant = mock_no_settings[container_indices.Variant] with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking. extruder_stack.definition = mock_layer_heights[container_indices.Definition] #There's a layer height in here! + extruder_stack.setNextStack(unittest.mock.MagicMock()) assert extruder_stack.getProperty("layer_height", "value") == container_indices.Definition extruder_stack.variant = mock_layer_heights[container_indices.Variant] @@ -382,4 +383,4 @@ def test_setVariantByIdExists(extruder_stack, container_registry): ## Tests setting variants by specifying an ID of a variant that doesn't exist. def test_setVariantByIdDoesntExist(extruder_stack): with pytest.raises(InvalidContainerError): - extruder_stack.setVariantById("some_variant") #Container registry is empty now. \ No newline at end of file + extruder_stack.setVariantById("some_variant") #Container registry is empty now.