示例#1
0
    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"
示例#2
0
 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