Browse Source

Expand the getMachine test

Jaime van Kessel 4 years ago
parent
commit
e1e0a4d32c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tests/TestMachineManager.py

+ 3 - 1
tests/TestMachineManager.py

@@ -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()