diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-09-09 17:45:03 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-09-09 17:45:39 +0300 |
commit | dba3b77f61fa265f0e284a6a8304fa9c47902658 (patch) | |
tree | 64ad5eed3a7329d3f941024cdfccc7df391107d3 /tests/Settings | |
parent | 04e2ecde9355a7dd5838b4a178418c0a0d6ec1bb (diff) |
Fix tests
CURA-6598
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/TestCuraStackBuilder.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/Settings/TestCuraStackBuilder.py b/tests/Settings/TestCuraStackBuilder.py index 9f2db2cf19..7a1e05296c 100644 --- a/tests/Settings/TestCuraStackBuilder.py +++ b/tests/Settings/TestCuraStackBuilder.py @@ -29,6 +29,14 @@ def quality_container(): @pytest.fixture +def intent_container(): + container = InstanceContainer(container_id="intent container") + container.setMetaDataEntry("type", "intent") + + return container + + +@pytest.fixture def quality_changes_container(): container = InstanceContainer(container_id="quality changes container") container.setMetaDataEntry("type", "quality_changes") @@ -44,7 +52,8 @@ def test_createMachineWithUnknownDefinition(application, container_registry): assert mocked_config_error.addFaultyContainers.called_with("NOPE") -def test_createMachine(application, container_registry, definition_container, global_variant, material_instance_container, quality_container, quality_changes_container): +def test_createMachine(application, container_registry, definition_container, global_variant, material_instance_container, + quality_container, intent_container, quality_changes_container): variant_manager = MagicMock(name = "Variant Manager") quality_manager = MagicMock(name = "Quality Manager") global_variant_node = MagicMock( name = "global variant node") @@ -61,6 +70,7 @@ def test_createMachine(application, container_registry, definition_container, gl application.getQualityManager = MagicMock(return_value = quality_manager) application.empty_material_container = material_instance_container application.empty_quality_container = quality_container + application.empty_intent_container = intent_container application.empty_quality_changes_container = quality_changes_container application.empty_variant_container = global_variant @@ -83,9 +93,11 @@ def test_createMachine(application, container_registry, definition_container, gl assert machine.variant == global_variant -def test_createExtruderStack(application, definition_container, global_variant, material_instance_container, quality_container, quality_changes_container): +def test_createExtruderStack(application, definition_container, global_variant, material_instance_container, + quality_container, intent_container, quality_changes_container): application.empty_material_container = material_instance_container application.empty_quality_container = quality_container + application.empty_intent_container = intent_container application.empty_quality_changes_container = quality_changes_container with patch("cura.CuraApplication.CuraApplication.getInstance", MagicMock(return_value=application)): extruder_stack = CuraStackBuilder.createExtruderStack("Whatever", definition_container, "meh", 0, global_variant, material_instance_container, quality_container) |