def test_happyFlow(self, application): with patch("UM.Application.Application.getInstance", MagicMock(return_value=application)): manager = MaterialManager(mocked_registry) manager.initialize() assert manager.getFallbackMaterialIdByMaterialType("pla") == "test"
def test_unknownMaterial(self, application): with patch("UM.Application.Application.getInstance", MagicMock(return_value=application)): manager = MaterialManager(mocked_registry) manager.initialize() assert manager.getFallbackMaterialIdByMaterialType("OMGZOMG") is None