mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
ExtruderStack requires a next stack, so make sure it has that in tests
This commit is contained in:
parent
d29ae60d38
commit
0c232c9462
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
extruder_stack.setVariantById("some_variant") #Container registry is empty now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue