mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Add test for getting quality changes groups without global stack
Shouldn't crash. Instead it should give no quality changes groups. Contributes to issue CURA-6600.
This commit is contained in:
parent
8bcd9b339a
commit
ea5530c507
1 changed files with 9 additions and 1 deletions
|
@ -93,4 +93,12 @@ def test_getCurrentQualityGroups(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"].getQualityGroups.assert_called_with(expected_variant_names, expected_material_base_files, expected_is_enabled)
|
||||
container_tree.machines["current_global_stack"].getQualityGroups.assert_called_with(expected_variant_names, expected_material_base_files, expected_is_enabled)
|
||||
|
||||
def test_getCurrentQualityChangesGroupsNoGlobalStack(container_registry):
|
||||
with patch("UM.Settings.ContainerRegistry.ContainerRegistry.getInstance", MagicMock(return_value = container_registry)):
|
||||
with patch("cura.CuraApplication.CuraApplication.getInstance", MagicMock(return_value = MagicMock(getGlobalContainerStack = MagicMock(return_value = None)))):
|
||||
container_tree = ContainerTree()
|
||||
result = container_tree.getCurrentQualityChangesGroups()
|
||||
|
||||
assert len(result) == 0
|
Loading…
Add table
Add a link
Reference in a new issue