mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Expand the getMachine test
This commit is contained in:
parent
ce930220e9
commit
e1e0a4d32c
1 changed files with 3 additions and 1 deletions
|
@ -34,6 +34,8 @@ def test_getMachine():
|
|||
registry.findContainerStacks = MagicMock(return_value=[mocked_global_stack])
|
||||
with patch("cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance", MagicMock(return_value=registry)):
|
||||
assert MachineManager.getMachine("test") == mocked_global_stack
|
||||
# Since only test is in the registry, this should be None
|
||||
assert MachineManager.getMachine("UnknownMachine") is None
|
||||
|
||||
|
||||
def test_addMachine(machine_manager):
|
||||
|
@ -134,7 +136,7 @@ def test_setActiveMachine(machine_manager):
|
|||
machine_action_manager.addDefaultMachineActions.assert_called_once_with(global_stack)
|
||||
# Yeah sure. It's technically an implementation detail. But if this function wasn't called, it exited early somehow
|
||||
machine_manager._validateVariantsAndMaterials.assert_called_once_with(global_stack)
|
||||
|
||||
|
||||
|
||||
def test_setInvalidActiveMachine(machine_manager):
|
||||
registry = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue