def test_melt__meltable_returns_True(): m = MaterialComponent('PLASTIC', 'MELT') assert m.melt()
def test_melt__meltable_calls_add_erosion(mocker): mocker.patch('components.material.MaterialComponent.add_erosion') m = MaterialComponent('PLASTIC', 'MELT') m.melt() m.add_erosion.assert_called_once()
def test_melt__nonmeltable_returns_False(): m = MaterialComponent('WOOD', 'BURN') assert m.melt() is False