mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Addded test for removing machine action
This commit is contained in:
parent
76cfb19dfb
commit
c7e3b1dcaf
1 changed files with 15 additions and 0 deletions
|
@ -104,3 +104,18 @@ def test_addMachineAction(machine_action_manager):
|
|||
machine_action_manager.addFirstStartAction(test_machine, "test_action")
|
||||
machine_action_manager.addFirstStartAction(test_machine, "test_action")
|
||||
assert machine_action_manager.getFirstStartActions(test_machine) == [test_action, test_action]
|
||||
|
||||
# Adding unknown action should not crash.
|
||||
machine_action_manager.addFirstStartAction(test_machine, "key_that_doesnt_exists")
|
||||
|
||||
def test_removeMachineAction(machine_action_manager):
|
||||
test_action = MachineAction(key="test_action")
|
||||
test_machine = Machine("test_machine")
|
||||
machine_action_manager.addMachineAction(test_action)
|
||||
|
||||
# Remove the machine action
|
||||
machine_action_manager.removeMachineAction(test_action)
|
||||
assert machine_action_manager.getMachineAction("test_action") is None
|
||||
|
||||
# Attempting to remove it again should not crash.
|
||||
machine_action_manager.removeMachineAction(test_action)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue