Test if we actually return the result of the call to getQuality[Changes]Groups

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-09-06 17:26:38 +02:00
parent 7f192ce36f
commit 5106d3b7c1
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -94,6 +94,7 @@ def test_getCurrentQualityGroups(container_registry, application):
expected_is_enabled = [True, True]
container_tree.machines["current_global_stack"].getQualityGroups.assert_called_with(expected_variant_names, expected_material_base_files, expected_is_enabled)
assert result == container_tree.machines["current_global_stack"].getQualityGroups.return_value
def test_getCurrentQualityChangesGroupsNoGlobalStack(container_registry):
with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = container_registry)):
@ -116,4 +117,5 @@ def test_getCurrentQualityChangesGroups(container_registry, application):
expected_material_base_files = ["current_global_stack_left_material_base_file", "current_global_stack_right_material_base_file"]
expected_is_enabled = [True, True]
container_tree.machines["current_global_stack"].getQualityChangesGroups.assert_called_with(expected_variant_names, expected_material_base_files, expected_is_enabled)
container_tree.machines["current_global_stack"].getQualityChangesGroups.assert_called_with(expected_variant_names, expected_material_base_files, expected_is_enabled)
assert result == container_tree.machines["current_global_stack"].getQualityChangesGroups.return_value