Fix test for stack builder

This commit is contained in:
Jaime van Kessel 2019-09-23 13:26:21 +02:00
parent 7e3f265068
commit 3a2c5b2473
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -82,7 +82,8 @@ def test_createMachine(application, container_registry, definition_container, gl
machine_node.preferredGlobalQuality = MagicMock(return_value = quality_node)
quality_node.container = quality_container
with patch("cura.Settings.CuraStackBuilder.MachineNode", MagicMock(return_value = machine_node)):
# Patch out the creation of MachineNodes since that isn't under test (and would require quite a bit of extra setup)
with patch("cura.Machines.ContainerTree.MachineNode", MagicMock(return_value = machine_node)):
with patch("cura.CuraApplication.CuraApplication.getInstance", MagicMock(return_value=application)):
machine = CuraStackBuilder.createMachine("Whatever", "Test Definition")