Fix nondetermistic result with dictionary values list

Because global_stack.extruders.values can be returned in any order, the configurations matching with the lists doesn't always give a result.
It happened to work on my computer with the test, but there is no guarantee of that.

This is probably also going wrong in other places. I don't think we should use the .extruders property anywhere really!

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-09-06 17:15:45 +02:00
parent d618f2df71
commit 4bdc819f12
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 5 additions and 5 deletions

View file

@ -19,8 +19,8 @@ def createMockedStack(definition_id: str):
extruder_right_mock.variant.getName = MagicMock(return_value = definition_id + "_right_variant_name")
extruder_right_mock.material.getMetaDataEntry = MagicMock(return_value = definition_id + "_right_material_base_file")
extruder_right_mock.isEnabled = True
extruder_dict = {"1": extruder_right_mock, "0": extruder_left_mock}
result.extruders = extruder_dict
extruder_list = [extruder_left_mock, extruder_right_mock]
result.extrudersList = extruder_list
return result