Fix tests in the ExtruderStack.

Contributes to CURA-5628.
This commit is contained in:
Diego Prado Gesto 2018-08-14 15:40:11 +02:00
parent e1fd9b03a4
commit b85950b128
3 changed files with 49 additions and 59 deletions

View file

@ -35,4 +35,9 @@ def global_stack() -> GlobalStack:
## An empty extruder stack to test with.
@pytest.fixture()
def extruder_stack() -> ExtruderStack:
return ExtruderStack("TestExtruderStack")
extruder_stack= ExtruderStack("TestExtruderStack")
# There is a restriction here that the definition changes cannot be an empty container. Added in CURA-5281
definition_changes_container = InstanceContainer(container_id = "InstanceContainer")
definition_changes_container.setMetaDataEntry("type", "definition_changes")
extruder_stack._containers[cura.Settings.CuraContainerStack._ContainerIndexes.DefinitionChanges] = definition_changes_container
return extruder_stack