def test_rot__rottable_calls_add_erosion(mocker): mocker.patch('components.material.MaterialComponent.add_erosion') m = MaterialComponent('WOOD', 'ROT') m.rot() m.add_erosion.assert_called_once()
def test_rot__nonrottable_returns_False(): m = MaterialComponent('IRON', 'RUST') assert m.rot() is False
def test_rot__rottable_returns_True(): m = MaterialComponent('WOOD', 'ROT') assert m.rot()