diff options
author | Kostas Karmas <konskarm@gmail.com> | 2020-11-06 11:19:21 +0300 |
---|---|---|
committer | Kostas Karmas <konskarm@gmail.com> | 2020-11-06 11:19:21 +0300 |
commit | c1becbe43cb878295d50f7b17e9fdf944b0e9b5d (patch) | |
tree | 84a11f828a70fd4a4c9d1c6a10a4d4c5101c8fc5 /tests | |
parent | a1c7ebe1c37c8dbabe4719209f63235119917d5c (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestMachineManager.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/TestMachineManager.py b/tests/TestMachineManager.py index 4f15a0670c..ae681f927d 100644 --- a/tests/TestMachineManager.py +++ b/tests/TestMachineManager.py @@ -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 @@ -253,4 +254,4 @@ def test_isActiveQualityNotSupported(machine_manager): def test_isActiveQualityNotSupported_noQualityGroup(machine_manager): machine_manager.activeQualityGroup = MagicMock(return_value=None) - assert not machine_manager.isActiveQualitySupported
\ No newline at end of file + assert not machine_manager.isActiveQualitySupported |