mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Fix failing tests in TestMachineManager
When the machine manager calls the _onGlobalContainerChanged(), it calls updateNumberExtruders Enabled, which triggers the signal numberExtrudersEnabledChanged. This, in turn, triggers the need to check the MachineManager's pyqtProperty numberExtrudersEnabled. Now, since this property has no setter, it cannot be patched. Instead, to work properly, patch the updateNumberExtrudersEnabled. CURA-7827
This commit is contained in:
parent
a1c7ebe1c3
commit
c1becbe43c
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ def machine_manager(application, extruder_manager, container_registry, global_st
|
|||
application.getGlobalContainerStack = MagicMock(return_value = global_stack)
|
||||
with patch("cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance", MagicMock(return_value=container_registry)):
|
||||
manager = MachineManager(application)
|
||||
manager.updateNumberExtrudersEnabled = MagicMock()
|
||||
manager._onGlobalContainerChanged()
|
||||
|
||||
return manager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue