diff options
Diffstat (limited to 'tests/TestExtruderManager.py')
-rw-r--r-- | tests/TestExtruderManager.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/TestExtruderManager.py b/tests/TestExtruderManager.py index 4ad75989de..6eca0a34ad 100644 --- a/tests/TestExtruderManager.py +++ b/tests/TestExtruderManager.py @@ -1,5 +1,5 @@ -from unittest.mock import MagicMock, patch +from unittest.mock import MagicMock def createMockedExtruder(extruder_id): @@ -15,17 +15,3 @@ def test_getAllExtruderSettings(extruder_manager): extruder_2.getProperty = MagicMock(return_value="zomg") extruder_manager.getActiveExtruderStacks = MagicMock(return_value = [extruder_1, extruder_2]) assert extruder_manager.getAllExtruderSettings("whatever", "value") == ["beep", "zomg"] - - -def test_registerExtruder(extruder_manager): - extruder = createMockedExtruder("beep") - extruder.getMetaDataEntry = MagicMock(return_value = "0") # because the extruder position gets called - - extruder_manager.extrudersChanged = MagicMock() - extruder_manager.registerExtruder(extruder, "zomg") - - assert extruder_manager.extrudersChanged.emit.call_count == 1 - - # Doing it again should not trigger anything - extruder_manager.registerExtruder(extruder, "zomg") - assert extruder_manager.extrudersChanged.emit.call_count == 1 |