def test_burn__burnable_calls_add_erosion(mocker): mocker.patch('components.material.MaterialComponent.add_erosion') m = MaterialComponent('WOOD', 'BURN') m.burn() m.add_erosion.assert_called_once()
def test_burn__nonburnable_returns_False(): m = MaterialComponent('IRON', 'RUST') assert m.burn() is False
def test_burn__burnable_returns_True(): m = MaterialComponent('WOOD', 'BURN') assert m.burn()